我想在我的应用程序中只将我的一个视图右转。 我的所有其他视图都处于肖像模式。以前的视图处于肖像模式。我将横向视图推向纵向视图。我如何正确地做到这一点?
从纵向模式到iOS5,iOS6的横向模式
:
//Orientation
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
// New Autorotation support
-(BOOL)shouldAutorotate {
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscapeRight;
}
这种方法在iOS6的 – Leena
的Leena不赞成你是对的 –