views:

24

answers:

1

I have setup a tab bar application with four tabs on the bottom (as set inside IB) Three of them are UIViews and one of them is a UITableView, and the empty shell of an app switches between tabs fine.

Now, being that I have no experience with tab bars, I am not sure where my logic for the view controllers goes. I am used to setting up a ViewController for each view, is that the case in a tab bar? Does each tab need a separately programmed viewcontroller? If not, how can I link my logic to the correct tab's view?

Please help. Thanks!

A: 

A UITabBarController manages an array of UIViewController objects. These in turn manage the UIViews that are visible to the user.

So yes, you need to create a separate UIViewController for each view that you want the UITabBarController to manage.

Jacob Relkin
Thanks. How do I hook up my viewcontroller to the TabBarController? Is there something I need to do in IB? I am just using the generic tabbar template from xcode
Jeremy