Alex Rivera | Logout

Setting hidesBottomBarWhenPushed leaves bottom bar missing after View Controller is popped

Asked 2009-06-24T19:39:58.747
21

I have the following setup:

A tab bar app. On one tab there is a navigation controller.

My workflow:

When I push a new viewController onto the navigation controller stack, I set the hidesBottomBarWhenPushed property.

This works great, the tab bar is "pushed" as the new view controller slides in place.

The problem:

When I pop this view controller and the root view controller is once again displayed, however, the tab bar is gone.

The navigation controller has grown to fill the space left by tab bar.

Is there a property I need to set to make the tab bar visible again?


What I have tried:

popping to the root view manually

setting (resetting) the hidesBottomBarWhenPushed for the root view

resizing the root view

resizing the view property of the navigation controller (just leaves a "white space" where the tab bat should be)

What "sorta" worked:

If I set the selected index of the tab bar controller to any other index, the tab bar appears. So I know it is still "around", but this does little to help me.

Edit
Report

2 Answers

1

In addition to doing this:

[self.navigationController popToRootViewControllerAnimated:YES];

Initially when you do self.hidesBottomBarWhenPushed = YES;

You have to change for viewControllerToBePushed.hidesBottomBarWhenPushed = YES;

That should do the work!

answered 2012-03-18T17:03:56.347
0

In the view controller that appears after the one with the toolbar is popped, try this magic:

- (void)viewWillAppear:(BOOL)animated {
    [self.navigationController setToolbarHidden:YES animated:YES];
}
answered 2013-03-15T20:21:26.057

Your Answer