开发者

Sliding TabBarController off screen when pushing new view on to navigationController

In apple's "TheElements" example projec开发者_如何学运维t, the tabBarController slides off screen with the rest of the view when pushing a view onto the tab button's navigation controller.

I cannot seem to see any code that specifically allows this??? But yet it happens..

Can someone point out what they are doing different?

From what I see: Create navigationControllers create views and push onto navigationControllers create tabbar and push navigation controllers as the tabBar's view array.

This is the conventional way to setup tab controllers but I cannot replicate the tab bar sliding off screen...


In general you can disable the TabBar when pushing controllers with hidesBottomBarWhenPushed:

[myController setHidesBottomBarWhenPushed:YES];
[navController pushViewController:myController animated:YES];


Have a look at AtomicElementViewController.m, line 75:

  self.hidesBottomBarWhenPushed = YES;

If you set this to NO, the tab bar will NOT be hidden, and will thus remain visible.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜