How to constrain autorotation to a single orientation for some views, while allowing all orientations on others?

The short answer is that you’re using UINavigationController, and that won’t work like you want it to. From Apple’s docs:

Why won’t my UIViewController rotate with the device?

All child view controllers in your
UITabBarController or
UINavigationController do not agree on
a common orientation set.

To make sure that all your child view
controllers rotate correctly, you must
implement
shouldAutorotateToInterfaceOrientation
for each view controller representing
each tab or navigation level. Each
must agree on the same orientation for
that rotate to occur. That is, they
all should return YES for the same
orientation positions.

You can read more about view rotation issues here.

You’ll have to roll your own view/controller stack management for what you want to do.

Leave a Comment