Jean-Luc Godard
Jean-Luc Godard

Reputation: 1883

How to hide tab of the tabBarController?

I want to create a Tab in the TabBarController but i don't want to show that on the tabBar...i mean it should be there but invisible...

like I have 5 tabs in my tabBarController and I want that my fifth Tab only is invisible...

is this possible??

Upvotes: 0

Views: 605

Answers (2)

Caleb
Caleb

Reputation: 124997

There's no way to hide an individual tab. You could give it a blank icon, I suppose, but you'd still see the space where the tab is. If you had more than 5 tabs, you could arrange for this invisible tab to be on the More... tab item, so it wouldn't be immediately visible but the user could access it.

If you don't want the user to be able to access it, one has to wonder why you want to include it in the tab bar controller in the first place. Rememeber: when you find yourself fighting against the framework like this, there's usually a much better way to do what you're trying to do.

Upvotes: 1

Noah Witherspoon
Noah Witherspoon

Reputation: 57149

Not really—the tab-bar controller is pretty specifically implemented so that any view controller it manages can be accessed from the tab-bar UI somehow, be it on the bar itself or in the “More” section. What are you trying to accomplish?

Upvotes: 0

Related Questions