Mon application lance en mode paysage correctement et fonctionne très bien:Iphone commutation en mode paysage en mode Portraite sur le chargement nouveau contrôleur
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if(interfaceOrientation == UIInterfaceOrientationPortrait)
return NO;
if(interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft)
return YES;
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Et Info.plist mis à jour avec
UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight
Maintenant, dans mon contrôleur principal Je déconnecte un ViewController pour un autre
characterController = [ [ CharacterController alloc ] init];
myCurrentViewController = characterController;
self.view = myCurrentViewController.view ;
et il charge mais l'orien L'image est en mode Portrait. Si j'ai ensuite fait pivoter l'iPhone, il le corrige en mode paysage. Des idées pour garder l'orientation paysage lors du chargement d'un nouveau viewController dans mon contrôleur principal?
Il est mis en œuvre la question ne correspondait pas à cela. J'ai mis à jour la question –