我有一个带有情节提要的 iOS 应用程序。我希望我的最后一个视图控制器始终保持纵向模式。我一直在阅读,我发现自从
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
已弃用我应该使用其他方法,例如
-(BOOL)shouldAutorotate
-(NSInteger)supportedInterfaceOrientations
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
但我已经尝试了很多这种方法的组合,但我一直没能做到。那么请有人告诉我正确的方法吗?