A: 

I wasn't able to get this to work the way I wanted. You ought to be able to set a particular orientation for a ViewController, but the NavigationController doesn't seem to always do the right thing.

I ennded up re-designing my screens so that they all work in either orientation. That might be extra work, but it "feels" more natural, anyway.

Mark Bessey
+1  A: 

There does not appear to be a way to do this using the documented methods.

I have filed a bug for this: rdar://6399924

"There is no way to always restrict a UIViewController to one orientation"

You can see it on open radar (along with a link to sample code to reproduce the problem) here: http://openradar.appspot.com/radar?id=697

lfalin
A: 

Like someone on the open radar suggested, a workaround is to disable "back" button while in non-portrait:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
    // don't let user press "back" button in landscape - otherwise previous view and the rest of the application
    // will also be in landscape which we did not feel like testing yet
    self.navigationController.navigationBarHidden = (UIInterfaceOrientationPortrait != self.interfaceOrientation);
}
A: 

There is a solution to do that : it's to use a view controller and adding its view to the window. then in that controller you force landscape in the shouldAutorotate... methode. It works fine, but be sure it's necessary for your project to use that, because it's not very smart  to force the user to turn his iPhone. By the way, here is an example code if you need it.

http://www.geckogeek.fr/iphone-forcer-le-mode-landscape-ou-portrait-en-cours-dexecution.html

Vinzius
A: 

hi im developing a webapp for iphone, and them i search all the web for a javascript that could do what u are describing here but whitout sucess. In my case, im doing a slideshow gallery that is in landscape ,and i need to the page open in landscape even the user is with the iphone in portrait.. so he will rotate the iphone and see the pictures in landscape...

anyone knows how to force a "page" to be loaded and not rotate from landscape???

Ruben Marcus Luz Paschoarelli