在push出的viewcontroller里面 下面方法不会被执行
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
我之前是这么做的:
添加UITabBarController、UINavigationController的分类
UITabBarController (xxx)
UINavigationController (xxx)