My app launches in landscape mode correctly and works great:
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(interfaceOrientation == UIInterfaceOrientationPortrait)
return NO;
if(interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft )
return YES;
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
And updated Info.plist with
UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight
Now in my main controller I switch out one ViewController for another
characterController = [ [ CharacterController alloc ] init];
myCurrentViewController = characterController;
self.view = myCurrentViewController.view ;
and it loads but the orientation is in Portrait mode. If I then rotated the iPhone it corrects it to landscape mode. Any ideas how to keep landscape orientation when loading a new viewController into my mainController?