我试图通过推动导航控制器以横向打开视图,但它始终以纵向打开。
第一个视图是纵向的,当我单击一个按钮时,下一个视图应该是横向的。
我正在尝试以下代码
调用视图:
ResultViewController *resultView = [[ResultViewController alloc] init];
[[self navigationController] pushViewController:resultView animated:YES];
应以横向打开的视图:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
这里还有什么可以尝试的吗?
谢谢