我的应用程序可以自动旋转,但我需要其中一个视图仅以纵向模式显示,并且不知道如何实现此目的.我试过这个(除其他事项外)但是有问题的观点仍然在旋转:
-(BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)