initWithNibName:bundle: vs viewDidLoad


Here we use the method initWithNibName:bundle: to prepare for the model.
But I also learned viewDidLoad is executed before the interface is ready. What’s the difference between initWithNibName:bundle: and viewDidLoad ?? and any reasons to use this method here?


The difference is something you will learn about later in the book.
Basically in viewDidLoad all pointers to the views and subviews are set when you access viewDidLoad, as opposed to when it’s merely just initialized.

If you’re really curious, you should skip ahead to page 138 and read that page. It pretty much explains just this.