P.268 creating a new UINavigationController?


#1

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


#2

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.


#3

Thank you!