2015-06-13 38 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 
}