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;
posted @ 2012-03-10 21:10  Ethan_村长  阅读(302)  评论(0编辑  收藏  举报