Skip to content

UIPageViewController

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

属性类型说明
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切换当前页控制器列表,并在完成后回调。

当前运行时未额外暴露 UIPageViewController 的类成员。

头文件 API 清单

正在加载…

协议:,来源: