Iphone – whats the different between nibNameOrNil and ViewDidLoad methods


whats os the difference between initWithNibName and ViewDidLoad methods ?
can i use them both?

Best Solution

initWithNibName - is what you call to create a view controller from specified nib file.

viewDidLoad - is what system calls on your controller after the controller’s view is loaded into memory. You can implement this method to perform some additional initialization (which is not done in nib file)