控制每个控制器的屏幕旋转实现:
两种父类中都可以重写以下两种方法,他们的子类(childViewController)中重写并实现。
1. UINavigationController
2. UITabBarController
- (BOOL)shouldAutorotate
{
return self.topViewController.shouldAutorotate;
}
- (NSUInteger)supportedInterfaceOrientations
{
return self.topViewController.supportedInterfaceOrientations;
}