Put it when you click the back button
[self.tabBarController.tabBar setHidden:YES]; [UIView animateWithDuration:0.5 animations:^{ self.tabBarController.tabBar.frame = CGRectMake(self.tabBarController.tabBar.frame.origin.x, self.tabBarController.tabBar.frame.origin.y+self.tabBarController.tabBar.frame.size.height, self.tabBarController.tabBar.frame.size.width, self.tabBarController.tabBar.frame.size.height); }
I have another answer ...
Put these two methods in all ViewController and control the BOOL variable , which self.hidesBottomBarWhenPushed is YES and NO as per your requirement
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.hidesBottomBarWhenPushed = YES; } - (void)viewDidDisappear:(BOOL)animated { self.hidesBottomBarWhenPushed = NO; }
source share