Make the start of the application and stay in landscape mode

How to launch the application in landscape mode and save it this way?

+3
source share
2 answers
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || 
   interfaceOrientation == UIInterfaceOrientationLandscapeRight);
} 
+5
source

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.

+1
source

All Articles