I am trying to make a navigation based application having three UIViewController in navigation stack. I have a bottom bar (UITabBar).
I want to hide tabbar when first UIViewController is pushed into the stack and I want to show tabbar when second UIVIewController is pushed.
Here is the code I have written to do so.
For First UIVIewController:
NotificationDetailsVC *obj = [[NotificationDetailsVC alloc] init];
obj.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:obj animated:YES];
[obj release];
For Second UIViewController I have done:
NotificationBO *obj=[self.notificationsArray objectAtIndex:indexPath.row];
object.hidesBottomBarWhenPushed = NO;
[self.navigationController pushViewController:object animated:YES];
[object release];
Now the problem is that, I can get UITabBar Hidden for first UIViewController, but for second it is also hidden.
How can I solve this issue?
Instead of using
hidesBottomBarWhenPushedmethod. Try your code for hiding tabbar in yourViewController, likeand for showing tabbar
The above one will work, but the problem is it’ll leave an empty space in
viewControllerbottom. To overcome this, setframeto yourtabbarController.For Hiding, set
For Showing, set