对于 supportedInterfaceOrientations(),Int 不能转换为 UIInterfaceOrientationMak
Int is not convertible to UIInterfaceOrientationMak for supportedInterfaceOrientations()
我还有另一个问题 Xcode 7. 我尝试了一些研究,但无法提出解决方案。错误是 Int 不可转换为 UIInterfaceOrientationMask。代码如下:
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
if visibleViewController is KINWebBrowserViewController { return Int(UIInterfaceOrientationMask.All.rawValue) }
return Int(UIInterfaceOrientationMask.Portrait.rawValue)
}
谢谢
Swift 3.x
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return visibleViewController is KINWebBrowserViewController ? .all : .portrait
}
我还有另一个问题 Xcode 7. 我尝试了一些研究,但无法提出解决方案。错误是 Int 不可转换为 UIInterfaceOrientationMask。代码如下:
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
if visibleViewController is KINWebBrowserViewController { return Int(UIInterfaceOrientationMask.All.rawValue) }
return Int(UIInterfaceOrientationMask.Portrait.rawValue)
}
谢谢
Swift 3.x
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return visibleViewController is KINWebBrowserViewController ? .all : .portrait
}