Int is not convertible to UIInterfaceOrientationMak for supportedInterfaceOrientations()

709 views Asked by At

I have another problem with Xcode 7. I have tried some research but cannot come up with a solution. The error is Int is not convertible to UIInterfaceOrientationMask. The code below:

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

Thanks

1

There are 1 answers

0
Leo Dabus On BEST ANSWER

Swift 3.x

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