More Modal View Controllers
In this part of the chapter, you will update Homepwner to present the BNRDetailViewController modally when the user creates a new BNRItem (Figure 17.3). When the user selects an existing BNRItem, the BNRDetailViewController will be pushed onto the UINavigationController’s stack as before.
Figure 17.3 New item
To implement this dual usage of BNRDetailViewController, 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.
Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.