how can I set an iphone app to start in Landscape mode? and stays that way
A:
Set the "Initial interface orientation" app.plist entry to "Landscape" (left or right home button) and add (or more likely, uncomment and edit) the following view controller method:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscape);
}
Marcelo Cantos
2010-05-03 22:11:41
did you mean: return interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight;
progrmr
2010-05-03 22:36:11
No, I intended it to force a single landscape orientation (that's how I would design it), but your point is quite valid. I guess it comes down to the OP's underlying intent.
Marcelo Cantos
2010-05-04 00:57:01