Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何以编程方式在swift、Xcode中设置UIPageViewController的转换样式?_Swift_Xcode_Uipageviewcontroller - Fatal编程技术网

如何以编程方式在swift、Xcode中设置UIPageViewController的转换样式?

如何以编程方式在swift、Xcode中设置UIPageViewController的转换样式?,swift,xcode,uipageviewcontroller,Swift,Xcode,Uipageviewcontroller,我试图在不使用情节提要的情况下以编程方式创建UIPageviewController,我知道情节提要上有一个设置转换样式的选项,但我无法做到这一点。我基本上想在代码中设置页面滚动的转换样式 我尝试了很多方法,但都没有成功。在初始化过程中,在使用viewdiload()函数之前执行此操作: override init(transitionStyle style: UIPageViewControllerTransitionStyle, navigationOrientation: UIPageV

我试图在不使用情节提要的情况下以编程方式创建UIPageviewController,我知道情节提要上有一个设置转换样式的选项,但我无法做到这一点。我基本上想在代码中设置页面滚动的转换样式


我尝试了很多方法,但都没有成功。

在初始化过程中,在使用
viewdiload()函数之前执行此操作:

override init(transitionStyle style: 
UIPageViewControllerTransitionStyle, navigationOrientation: UIPageViewControllerNavigationOrientation, options: [String : Any]? = nil) {
    super.init(transitionStyle: .whatever_style, navigationOrientation: .horizontal, options: nil)
}
required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
}