tags:

views:

393

answers:

1

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
did you mean: return interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight;
progrmr
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