P.268 creating a new UINavigationController?


Why was a new UINavigationController created instead of using [[self navigationController] pushViewController: detailViewController animated: YES]?


Because the exercise wants you to display the DetailViewController modally. Your code snippet is a different style of presentation.

As written in the book the navigation controller is just being used for the navigation bar (to house buttons) since no other view controllers get pushed onto the stack.


Thank you!