2015-06-13 36 views
1

我有Xcode 7的另一个问题。我已经尝试了一些研究,但不能拿出一个解决方案。错误是Int不能转换为UIInterfaceOrientationMask。下面的代码:INT是不可转换为UIInterfaceOrientationMak supportedInterfaceOrientations()

override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask { 
    if visibleViewController is KINWebBrowserViewController { return Int(UIInterfaceOrientationMask.All.rawValue) } 
    return Int(UIInterfaceOrientationMask.Portrait.rawValue) 
} 

感谢

回答

1

斯威夫特3.X

override var supportedInterfaceOrientations: UIInterfaceOrientationMask { 
    return visibleViewController is KINWebBrowserViewController ? .all : .portrait 
}