I want to use a UITabBarController but find that very difficult. I have a book that uses it in a giant project where I would have to complete that for a week or so and then find out what parts belong to making the UITabBarController work. Maybe you know of an good article about that?
Share
Here‘s a full example, and here’s the short version:
You can start with a “Navigation-Based Application” and basically swap out the navigation controller for a tab bar controller.
Typically, you’ll add a Tab Bar Controller object to your MainWindow.xib (just drag it out of the library and into your view — after deleting the navigation controller), and hook it to an outlet in your application delegate. In your
applicationDidFinishLaunching:add the following line before[window makeKeyAndVisible];:(this will probably replace something very similar to what is there by default).
Now you’ll want to define the view controllers for each tab. Once you have class files created, go into your MainWindow.xib and add items to your tab bar. For each, change the object type (fourth tab on the inspector) to the class name you’ve chosen for that particular tab’s view controller.
That’s it in a nutshell.