2011-10-23 14 views
0

私はタブバーベースのiPhoneアプリを持っています。タブベースのiPhoneアプリでは、一部のViewControllerでタブバーを非表示にする方法はありますか?

アプリは2つのタブで構成されています。 各タブには、3つのViewControllerを持つナビゲーションコントローラがあります。

ViewControllerの1つにTabBarが表示されないようにするには(既に独自のTabBarナビゲーションがあるため)

答えて

2

は信用元postert、このAが見つかりました:

Is it possible to hide the tabbar when a button is pressed to allow a full screen view of the content?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; 

if (appDelegate.navigationController.navigationBar.hidden == NO) 
{ 
    [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; 
    [appDelegate.navigationController setNavigationBarHidden:YES animated:YES]; 

    [UIView beginAnimations:@"HideTabbar" context:nil]; 
    [UIView setAnimationDuration:.2]; 
    self.view.frame = CGRectMake(0,0,320,480); 
    [UIView commitAnimations]; 
} 
if (appDelegate.navigationController.navigationBar.hidden == YES) 
{ 
    [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; 
    [appDelegate.navigationController setNavigationBarHidden:NO animated:YES]; 

    [UIView beginAnimations:@"ShowTabbar" context:nil]; 
    [UIView setAnimationDuration:.2]; 
    self.view.frame = CGRectMake(0,0,320,368); 
    [UIView commitAnimations]; 
}   
} 
+0

'self.hidesBottomBarWhenPushed = YES;'ありがとう! –

関連する問題