1
在我的.plist文件中启用界面方向支持。但我只需要在一个viewController中启用横向方向。在其他viewController我不能禁用风景模式。请告诉我如何禁用除一个viewController外的所有viewController的横向模式。如何禁用ios 7中的界面方向更改
在我的.plist文件中启用界面方向支持。但我只需要在一个viewController中启用横向方向。在其他viewController我不能禁用风景模式。请告诉我如何禁用除一个viewController外的所有viewController的横向模式。如何禁用ios 7中的界面方向更改
您可以使用
- (BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskPortrait;
//return here which orientation you are going to support
}
我有此相同问题
。无论我如何设置支持的界面方向,它始终允许旋转。并且supportedInterfaceOrientations甚至会被调用! shouldAutorotate永远不会被调用。 – Justin