Implement the controller method shouldAutorotateToInterfaceOrientation:andreturn UIInterfaceOrientationIsLandscape(orientation);
Also set the keys Info.plist UIInterfaceOrientationand UISupportedInterfaceOrientationsto UIInterfaceOrientationLandscapeLeftand UIInterfaceOrientationLandscapeRight. UIInterfaceOrientationwill take one value, so assign one of them and assign both of them UISupportedInterfaceOrientations.
source
share