Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4166083
  • 博文数量: 291
  • 博客积分: 8003
  • 博客等级: 大校
  • 技术积分: 4275
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-30 18:28
文章分类

全部博文(291)

文章存档

2017年(1)

2013年(47)

2012年(115)

2011年(121)

2010年(7)

分类: iOS平台

2013-01-21 18:40:06

今天在程序中想实现让UIPageViewController 的翻页方式改为左右滑动

查了半天是通过设置TransitionStyle实现,修改为UIPageViewControllerTransitionStyleScroll,但是测试中发现翻页效果还是原来的,找到苹果的文档

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html#//apple_ref/occ/instm/UIPageViewController/setViewControllers:direction:animated:completion:

enum {
   UIPageViewControllerTransitionStylePageCurl = 0
   UIPageViewControllerTransitionStyleScroll = 1
};
typedef NSInteger UIPageViewControllerTransitionStyle;
Constants
UIPageViewControllerTransitionStylePageCurl
Page curl transition style.

When the page curl transition style is specified, the page view controller displays a page-turning animation when transitioning between view controllers. If a data source is specified, the animation follows the user’s finger during a navigation gesture.

Available in iOS 5.0 and later.

Declared in UIPageViewController.h.

UIPageViewControllerTransitionStyleScroll
Scrolling transition style.

When the page scrolling style is specified, the page view controller displays a page-scrolling animation when transitioning between view controllers. If a data source is specified, the animation follows the user’s finger during a navigation gesture.

Available in iOS 6.0 and later.

Declared in UIPageViewController.h.


UIPageViewControllerTransitionStyleScroll表示左右滑动 ios6以上支持


UIPageViewControllerTransitionStylePageCurl表示翻页效果,ios5以上支持

我在ios6模拟器下看到了左右滑动效果,在ios5下还是普通翻页效果



阅读(18740) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~