我有一个带故事板的iOS应用程序.我希望我的上一个viewcontroller始终处于纵向模式.我一直在读书,从那以后我发现了
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
Run Code Online (Sandbox Code Playgroud)
不推荐使用我应该使用其他方法
-(BOOL)shouldAutorotate
-(NSInteger)supportedInterfaceOrientations
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
Run Code Online (Sandbox Code Playgroud)
但我已经尝试了很多这种方法的组合,我无法做到这一点.所以请有人能告诉我正确的方法吗?