Modal View Controllers
In this part of the exercise, you will update Homepwner to present the ItemDetailViewController modally – but only when the user creates a new Possession. When the user selects an existing Possession, the ItemDetailViewController will be pushed onto the UINavigationController’s stack as before.
Figure 14.5 New item

To implement this dual usage of ItemDetailViewController, you will give it a new designated initializer, initForNewItem:isNew:. This initializer will check whether the instance is being used for creating a new Possession or for showing an existing one and then configure the interface accordingly.
In ItemDetailViewController.h ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access