Ipad 界面定位问题

Ipad 界面定位问题,ipad,uiview,ios4,screen-orientation,uiinterfaceorientation,Ipad,Uiview,Ios4,Screen Orientation,Uiinterfaceorientation,我有下面的代码,它允许我将我的特定视图旋转到横向,但是一旦它转到横向,它将不会旋转回纵向?感谢您的帮助 @implementation SubMenusViewController @synthesize subMenusView; @synthesize mainMenuData; // The designated initializer. Override if you create the controller programmatically and want to perform

我有下面的代码,它允许我将我的特定视图旋转到横向,但是一旦它转到横向,它将不会旋转回纵向?感谢您的帮助

@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;
}
//替代以允许默认纵向方向以外的方向。 -(BOOL)应该自动旋转指针面定向:(UIInterfaceOrientation)interfaceOrientation{ //对于支持的方向返回YES 返回YES;//(interfaceOrientation==UIInterfaceOrientationParative); }


尝试以下shouldAutorotate方法:

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

很抱歉,我遗漏了这一部分//覆盖以允许默认纵向方向以外的方向。-(BOOL)应该自动旋转指向面方向:(UIInterfaceOrientation)interfaceOrientation{//对于支持的方向返回YES;//(interfaceOrientation==UIInterfaceOrientation纵向);}
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
     return YES;
}