I’m developing an iPhone application and I started out with the navigation based template.
But now i’d like to add a Tap Bar controller at the bottom and I would like to do this without using Interface Builder. Can anybody tell me how to do this?
Thanks in advance!
I’m developing an iPhone application and I started out with the navigation based template.
Share
If you are asking how to start with a navigation controller and then allow the user to navigate to a view with a tabbar, I do exactly this in my iPad app. Go to the website listed in my profile if you are interested to see how my app uses the tab bar.
Although, I used Interface Builder to accomplish it. In Interface Builder, I created sort of a master view that contains the tabbar control at the bottom and a “content” UIView above it. As the user tabs through views, the “content” view is programmatically assigned the view that the user is interested in.
I suppose you could also accomplish it without IB. Just use code this:
Of course, you will want to create tab bar items and assign view controllers to each item. You may also have to tweak the tab bar control’s layout params so that it sits at the bottom of the view.