Iphone xcode default landscape mode
2 answers
Set the app.plist entry Initial Interface Orientation to Landscape (Left or Right button) and add (or more likely uncomment and edit) the following view controller method:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
+7
a source to share
Marcelo's answer is incorrect because it is UIInterfaceOrientationLandscape
not a valid identifier and therefore causes the build to fail.
progrmr is correct:
return interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight;
(Apologies for not commenting on the first answer, but I didn't have enough reputation points when I wrote this ...)
+6
user577537
a source
to share