我在下一篇的Swift 1.2中写道:
{{1}}
但是现在,在Swift 2中它打印出下一个错误:
{{1}}
我该如何解决?
答案 0 :(得分:9)
您应该确保您的viewControllers不是可选的Type。如:
var viewControllers:[UIViewController] = [VC1,VC2]
self.pageViewController.setViewControllers(viewControllers, direction: UIPageViewControllerNavigationDirection.Forward, animated: true, completion: nil)