Tag: uipageviewcontroller swift2

Swift 2:“Bool”不能转换为“BooleanLiteralConvertible”

我在XCode 6创build了一个应用程序。 今天我下载了XCode 7 ,它已经将我的应用程序更新到了Swift 2 。 有很多错误,但现在只有一个我不能解决。 我不知道为什么,但Xcode不喜欢任何Bool选项的animated和显示此错误 – 'Bool'不能转换为'BooleanLiteralConvertible' (如果你看看这个函数本身,你会看到,它完全采用Bool animated ) var startVC = self.viewControllerAtIndex(indexImage) as ContentViewController var viewControllers = NSArray(object: startVC) self.pageViewContorller.setViewControllers(viewControllers as [AnyObject], direction: UIPageViewControllerNavigationDirection.Forward, animated: true, completion: nil) 'Bool' is not convertible to 'BooleanLiteralConvertible' 有谁知道,我该怎么解决? 谢谢。