Nader
Nader

Reputation: 3

Sliding TabBarController off screen when pushing new view on to navigationController

In apple's "TheElements" example project, 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...

Upvotes: 0

Views: 656

Answers (2)

Rayfleck
Rayfleck

Reputation: 12106

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.

Upvotes: 0

cweinberger
cweinberger

Reputation: 3588

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

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

Upvotes: 1

Related Questions