tabbar 旋转指定的页面
在tabbar页面并不希望所有试图都可以选择:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
//如果是文章显示页可以旋转
UINavigationController *curNav=self.selectedViewController;
if (toInterfaceOrientation==UIInterfaceOrientationLandscapeLeft||toInterfaceOrientation==UIInterfaceOrientationLandscapeRight||toInterfaceOrientation==UIInterfaceOrientationPortrait) {
if ([[curNav.viewControllers lastObject] isKindOfClass:[detailViewController class]]) {
return YES;
}
}
return NO;
}
{
//如果是文章显示页可以旋转
UINavigationController *curNav=self.selectedViewController;
if (toInterfaceOrientation==UIInterfaceOrientationLandscapeLeft||toInterfaceOrientation==UIInterfaceOrientationLandscapeRight||toInterfaceOrientation==UIInterfaceOrientationPortrait) {
if ([[curNav.viewControllers lastObject] isKindOfClass:[detailViewController class]]) {
return YES;
}
}
return NO;
}