2013-05-01 34 views

回答

4

在iOS 5中,您需要在视图控制器的每个人中实现以下方法。

// Called only in IO 5 and earlier. 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || 
      interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
} 

,并设置你的Info.plist

UIInterfaceOrientation“初始界面方向 ”到UIInterfaceOrientationLandscapeRight铺陈在横向模式下您的看法。

Apple's developer docs

+0

谢谢男人。有效 – 2013-05-01 20:23:59