【发布时间】:2013-02-01 10:28:14
【问题描述】:
我只想将我的应用中的一个视图转为横向。
我所有的其他视图都处于纵向模式。上一个视图处于纵向模式。我将横向视图推到纵向视图。我怎样才能正确地做到这一点?
在我的横向视图控制器中:
//Orientation
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
// New Autorotation support
-(BOOL)shouldAutorotate {
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscapeRight;
}
【问题讨论】:
标签: ios6 xcode4.5 autorotate landscape-portrait