cc_hey
cc_hey

Reputation: 81

Hiding tab bar items on xcode

So i have a tab bar controller linked to 4 different view controllers. My first viewcontroller (First page that pops up during simulation) is my login page. I just want to hide the tab bar items before logging in and after the right login details have been entered re-enable the tab bar items to be accessible. I have read other related questions in this site however i can't seem to find a simple solution. I thought the coding would be as easy as hiding images or labels.

any help will be great!

Upvotes: 0

Views: 1363

Answers (1)

Sujay
Sujay

Reputation: 2520

Try:

//To hide the tab bar
self.tabBar.hidden = YES;

//To disable tab bar item in tab bar controller
[[[[self.tabBarController tabBar]items]objectAtIndex:1]setEnabled:FALSE];

Upvotes: 1

Related Questions