Austin
Austin

Reputation: 5655

Status Bar Rotates but UIViewController Does Not

I have a UIViewController that rotates as normal when it is first pushed (it's the root view controller of the app's UINavigationController), but will not rotate after the navigation controller pops back to it. The status bar rotates, and shouldAutoRotateToInterfaceOrientation: is called (and returns YES), but the view does not rotate and didRotateToInterfaceOrientation: is not called.

Has anyone seen this before or know what might cause it? Thanks in advance.

Upvotes: 0

Views: 598

Answers (1)

Austin
Austin

Reputation: 5655

Gah, silly mistake: I pushed the login controller with the line:

[self.navigationController setViewControllers:[NSArray arrayWithObjects:[[LoginViewController alloc] autorelease],nil] animated:YES];

Which omits the init method. I corrected the error and rotation works. Silly me.

Upvotes: 0

Related Questions