문제

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