O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Joe Conway, Aaron Hillegass

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

An Additional UIViewController

To see the real power of UINavigationController, you need another UIViewController to put on the navigation controller’s stack. Create a new Objective-C class (FileNewNew File...). Name this class DetailViewController and choose UIViewController as the superclass. Check the box With XIB for user interface (Figure 11.6).

Figure 11.6  View controller with XIB subclass

View controller with XIB subclass

In DetailViewController.m, delete all of the code between the @implementation and @end directives so that the file looks like this:

#​i​m​p​o​r​t​ ​"​D​e​t​a​i​l​V​i​e​w​C​o​n​t​r​o​l​l​e​r​.​h​"​ @​i​m​p​l​e​m​e​n​t​a​t​i​o​n​ ​D​e​t​a​i​l​V​i​e​w​C​o​n​t​r​o​l​l​e​r​ ...

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