I am trying to implement this function in a textbook and it isn't working. The book is on a different version of swift so that is probably why It isn't working. Im wondering if anyone knows how to figure this out? I am using swift.
override func supportedInterfaceOrientations() -> Int {
return Int(UIInterfaceOrientationMask.Portrait.rawValue) |
Int(UIInterfaceOrientationMask.Landscape.rawValue)
}
Error: Method does not 'override' any method from its superclass.
When I remove override, it gives me this error:
Method 'supportedInterfaceOrientations()' with Objective-C selector 'supportedInterfaceOrientations' conflicts with method 'supportedInterfaceOrientations()' from superclass 'UIViewController' with the same Objective-C selector