Cover 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

O'Reilly logo

More Modal View Controllers

In this part of the chapter, you will update Homepwner to present the DetailViewController modally when the user creates a new BNRItem. When the user selects an existing BNRItem, the DetailViewController will be pushed onto the UINavigationController’s stack as before.

Figure 13.4  New item

New item

To implement this dual usage of DetailViewController, you will give it a new designated initializer, initForNewItem:. This initializer will check whether the instance is being used to create a new BNRItem or to show an existing one. Then it will configure the interface accordingly.

In DetailViewController.h, declare this initializer. ...

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