O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

All Done

As you just found out, tab bar controllers are easy to add to your applications. The part that takes the most time is writing the view controllers for each tab. Just as you did with navigation controllers, you created the tab bar controller in code. Setting the tabs was as easy as creating and assigning an array of view controllers. Because navigation controllers are just a view controller subclass, you can add them to the array as well. To customize the tabs themselves, you needed to override the initWithNibName:bundle: method, but then it was just a matter of setting the self. tabBarItem property to a new UIBarButtonItem. All in all, it’s not much work, allowing you to focus on the behavior of each view controller rather than reinventing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required