I'm trying to create an app that only supports portrait orientation, I have tried setting at Target -> General -> Deployment Info -> Portrait
Then, at appDelegate.swift
override func shouldAutorotate() -> Bool {
return false
}
AT ViewController.swift
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
return [UIInterfaceOrientationMask.Portrait ]
}
But it doesn't work.. At ViewController.swift, it give me error:
Method does not override any method from its superclass