If the previous view controller only supports portrait (see shouldAutorotateToInterfaceOrientation:
) then it should automatically rotate.
If the previous view controller supports landscape but you want it to rotate to portrait if it was originally in portrait, you can probably force it by changing what shouldAutorotateToInterfaceOrientation:
returns when navigating back. I wouldn't recommend this; it's inconsistent UI (and it's a bit tedious to figure out what navigation is going on).
There are various ways to set the view controller interface orientation (-[UIDevice setOrientation:]
will attempt to trigger an autorotation), but then you're into the realm of private APIs and potential rejection.