I had a navigation controller based application. And I decided to use tab bars in my application.
When the user presses at a certain tab bar item I want to display a certain view controller – and I want programmatically in my code choose which one to display.
I tried to add in the Interface Builder a navigation controller into my tab bar, but viewWillAppear of its view controller is not being called.
How can I implement this feature?
I don’t know if it’s the “right way”, but here’s how I usually do this with three tabs.
In the init method each viewController you can do something like:
To set the icon used in the tab bar, the title in the tab bar, and the title of you navigation item.