0
我有下面的代碼,它允許我將我的特定視圖旋轉到風景,但是一旦它轉到風景,它將不會旋轉回肖像?任何幫助表示讚賞。UIInterface方向問題
@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)shouldAutorotateToInterfaceOrientation :(UIInterfaceOrientation)interfaceOrientation { //對於支持的方向,返回YES; 返回YES; //(interfaceOrientation == UIInterfaceOrientationPortrait); }
Thanks for your help!
我的道歉,我離開了這部分; //覆蓋以允許默認縱向方向以外的方向。 (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {//支持方向返回YES \t返回YES; //(interfaceOrientation == UIInterfaceOrientationPortrait); } – James 2010-11-15 23:53:28