View without active TabBarItem

279 views Asked by At

Is there a way to add to a TabBarController a view that is displayed without a TabItem must be active? If so, how it can be implemented?

Update:

I have a TabBarController with five TabBarItems. When I start my app, then by default the first TabItem is active. I would, however, that none of the TabBarItems is active and a view is displayed (TabBar remains visible). If I then type in the first TabBarItem, the appropriate view becomes visible.

1

There are 1 answers

1
Pacu On BEST ANSWER

Well I came across that need, and I must tell you that I had to implement my own tab bar to do so.

The TabBarController is designed to have at least one tab active. there are a few hacks posted online, one of them here in stackoverflow. I wouldn't waste too much time trying that stuff. It didn't really work for me and it was so much quicker to start coding that being all "trial and error" with a hack that can get your app kicked out of the app store.

The TabBarController is not meant to be subclass for some reason. So I wouldn't recommend that you extend it. since any change in the API can make your app crash.

here's a tutorial on how to do a tabbar like the one on the twitter app. http://idevrecipes.com/2010/12/17/twitter-app-tab-bar-animation/

I'm sorry that I can't share the code with the community. Contract stuff, you know. :(