【发布时间】:2011-06-16 05:24:41
【问题描述】:
我有一个基于选项卡的应用程序,其中有 4 个视图与 4 个选项卡相关联。我想要所有 3 个纵向视图和一个横向视图。
我已经为该特定视图完成了这些设置:
在 info.plist 的 Supported interface orientations 中设置所需的值。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
}
在 IB 中将方向属性设置为横向。
在-(void)viewDidLoad我设置了self.view.frame=CGRectMake(0, 0, 480, 320);
完成以上所有设置后,它仍然无法进入横向模式。
【问题讨论】:
标签: iphone objective-c ipad landscape uiinterfaceorientation