So I am trying to start a project w/o Storyboards and I can't seem to figure out why the UIWindow is not passing autorotation commands to the root view controller. With storyboards, the autorotation works. If I create the window programmatically, autorotation does not work.
This is how I instantiate the window in the App Delegate:
window = UIWindow(frame: UIScreen.mainScreen().bounds)
if let window = window {
window.backgroundColor = UIColor.whiteColor()
window.makeKeyAndVisible()
let nc: SignInViewController = UIStoryboard(name: "Main", bundle: nil)
.instantiateViewControllerWithIdentifier("SignInViewController") as SignInViewController
window.rootViewController = nc
}
Thanks!