質問

In iOS 7, TabBar hides when I used nextviewcontroller.hidesBottomBarWhenPushed = YES; but need tabbar to be shown again when I pop back to the viewcontroller.
Its not coming back by using nextviewcontroller.hidesBottomBarWhenPushed = NO;
Any help will be appreciated .

役に立ちましたか?

解決

this solved my problem:

- (void)viewWillAppear:(BOOL)animated { 
    self.tabBarController.tabBar.hidden = YES; 
}
- (void)viewWillDisappear:(BOOL)animated {
    self.tabBarController.tabBar.hidden = NO; 
}

他のヒント

I found simplest way to achieve hide and show of UITabBar.

nextviewcontroller.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:nextviewcontroller animated:YES];
nextviewcontroller.hidesBottomBarWhenPushed = NO;

So right after you push the view controller set the hidesBottomBarWhenPushed = NO; this way Tabbar would be shown when you come back to view controller.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top