小编Nik*_*hin的帖子

Swift 2:"Bool"不能转换为'BooleanLiteralConvertible'

我创建了一个应用程序XCode 6.今天我下载了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'
Run Code Online (Sandbox Code Playgroud)

有谁知道,我该怎么解决?

谢谢.

xcode ios uipageviewcontroller swift swift2

6
推荐指数
1
解决办法
1579
查看次数

标签 统计

ios ×1

swift ×1

swift2 ×1

uipageviewcontroller ×1

xcode ×1