I have a simple application consisting of a single view controller. I started with the Single View Application Xcode 7 GM application template, but then removed the main storyboard and set up my view controller as follows:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let vc = ViewController()
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = vc
window!.makeKeyAndVisible()
return true
}
In my information plist, I have all the orientations indicated in the Orientation section of the supported interfaces section, and the application rotates to all orientations on the iPad.
However, in my simple methods vidaยน Manager shouldAutorotate()and supportedInterfaceOrientations()are never called. This is a problem because I am experimenting with user interface controls that enable and disable automatic rotation. What can prevent these methods from being called?
Sample project here (requires Swift 2)
ยนnon- UINavigationController