开发者

Bringing back the tab bar after pushing a view controller?

In the iPhone app I'm making, there's a UINavigationController that can drill down one layer to another view controller.

On the top-most view controller, I hide the Tab Bar with this line...

TopViewController.hidesBottomBarWhenPushed = YES;

... in the app delegate. Then, from the TopViewController, the user can push a UIButton that will take them down to another ViewController, in which I do not want to hide the tab bar.

I tried adding this line in viewDidLoad in the second-level view controller, but it doesn't work:

self.hidesBottomBarWhenPushed = NO;

Does anyone know how I can bring my tab bar back? Thanks开发者_开发知识库


The documentation states:

Discussion If YES, the bar at the bottom of the screen is hidden; otherwise, NO. If YES, the bottom bar remains hidden until the view controller is popped from the stack.

But can you try setting the value to YES in the action method for your button? Right before you push the new view controller in place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜