Problem with hidesBottomBarWhenPushed
I'm having trouble hiding the bottom tab bar when navigating backwards through the navigation tree. First, let me describe my view flow (all of my objects are created programatically, i.e. no interface builder is used with my app):
1. The root screen of my app is a tab bar controller which has an array of view controllers attached to it. One of the view controllers attached to the tab bar is a table view controller which has several cells that the user can select.
2. The user selects a table view cell, and the screen pushes to a new table view controller that should not be associated with a tab bar controller, therefore no tab bar should be visible.
3. The user selects a table view cell (again) and the screen pushes to a new (different from step 1) tab bar controller that has an array of view controllers assigned to it (so there should be a tab bar visible at the bottom of the window).
The problem I'm having is when the user goes from step 1 to step 2, I set hidesBottomBarWhenPushed = YES on the step 2 view controller and the tab bar correctly disappears. Then when the user goes from step 2 to step 3, the new tab bar correctly appears.
HOWEVER, if the user presses the back buttom from step 3 to step 2, then the tab bar from step 1 appears, which shouldn't be visible. How can I get it so that when moving backwards through the navigation tree, the tab bar doesn't reappear? I've tried setting hidesBottomBarWhenPushed everywhere and nothing seems to work.
Is this a bug, or am I setting this property in the wrong place?
|