我有一个 iPad TabBarApplication。我将 TabbarController 子类化以使应用程序对方向更改做出反应:
@实现 frankenlandTabBarController
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (
interfaceOrientation == UIInterfaceOrientationPortrait ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight
);
}
@end
现在的问题是,我不希望我的 tabbarapp 的所有视图控制器都在这个方向上。
覆盖shouldAutorotateToInterfaceOrientation
单个控制器中的方法没有任何效果。
有任何想法吗?
谢谢!