2010-07-01 69 views
0

嗨,如何隱藏UITabBarController

我有listController,detailsController和editController。我需要爲DetailsController隱藏UITabBarController而不是所有其他控制器。我使用下面的代碼。

ListController.m

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

{ 

detailsController* detailViewController = [[detailsController alloc] init]; 

detailViewController.hidesBottomBarWhenPushed=YES; 

[self.navigationController pushViewController:detailViewController animated:YES]; 

} 

不過,我的問題是editController我不是在底部得到的UITabBarController。

但是,我需要在editController中獲得TabBarController。

請任何人幫我解決這個問題。

謝謝提前。

回答

0

...你有導航控制器嗎?

如果沒有,你可以使用

detailViewController.modalInPopover = YES; 
detailViewController.wantsFullScreenLayout = YES; 
detailViewController.modalPresentationStyle = UIModalPresentationFullScreen; 
[self presentModalViewController:detailViewController animated:YES]; 

,並告訴你它是在全屏,隱藏的TabBar。

要關閉它使用:

[self dismissModalViewControllerAnimated:YES]; 

阿爾貝託。