0

J'ai le code suivant qui me permet de faire pivoter ma vue spécifique au paysage, mais une fois qu'il passe en mode paysage, il ne reviendra pas en mode portrait. Toute aide est appréciée.UIInterface Orientation Issue

@implementation SubMenusViewController 
@synthesize subMenusView; 
@synthesize mainMenuData; 

// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. 
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { 
     // Custom initialization 
    subMenusView=[[SubMenusView alloc] initWithFrame:[UISettings rectOfFullScreen:UIInterfaceOrientationPortrait]]; 
    } 
    return self; 
} 

// Remplacer pour autoriser des orientations autres que l'orientation portrait par défaut. - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { // Renvoie YES pour les orientations prises en charge return YES; // (interfaceOrientation == UIInterfaceOrientationPortrait); }

Thanks for your help! 
+0

Mes excuses, je quitte cette section; // Remplacer pour autoriser les orientations autres que l'orientation portrait par défaut. - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { // Renvoie YES pour les orientations prises en charge \t return YES; // (interfaceOrientation == UIInterfaceOrientationPortrait); } – James

Répondre

0

Essayez cette méthode shouldAutorotate:

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    return YES; 
}