API参考UIKit

UIPageViewController

分页容器控制器。支持设置数据源/代理、转场样式与切换页面并获得完成回调。

UIPageViewController 继承自 UIViewController,用于构建左右翻页/卷轴式分页容器。

实例成员 (Instance members)

属性

属性类型说明
doubleSidedboolean是否双面显示。
navigationOrientationnumber只读。导航方向。
spineLocationnumber只读。书脊位置。
transitionStylenumber只读。转场样式。
gestureRecognizersNSArray只读。内置手势识别器列表。
viewControllersNSArray只读。当前页面控制器列表。
delegateid代理对象。
dataSourceid数据源对象。

方法

方法参数返回值说明
initWithTransitionStyleNavigationOrientationOptions(style, navigationOrientation, options)style: number, navigationOrientation: number, options: NSDictionary | nullid初始化并指定转场/方向/选项。
setViewControllersDirectionAnimatedCompletion(viewControllers, direction, animated, completion)viewControllers: NSArray, direction: number, animated: boolean, completion: (finished: boolean) => voidvoid切换当前页控制器列表,并在完成后回调。

类成员 (Class members)

当前接口未额外暴露 UIPageViewController 的类成员。

相关

头文件API清单

正在加载...

协议:JSBUIPageViewController,来源:-