Say I create a navigation based application from the template in XCode4, then there will be in the MainWindow.xib a Navigation Controller, which has as a child the RootViewController.
When exactly would then:
In particular when in relation to the timing for the applicationDelegate "didFinishLaunchingWithOptions" method and when it occurs.
As given in the plist the MainWindow is the Main nib file base name. So there is some hidden code which will be generated based on the plist to load the main window nib file on startup. This happens before didFinishLaunchingWithOptions.
As soon as the MainWindow nib is loaded there is a cascade of things that are done in the background, please refer to The Nib Object Life Cycle in the Resource Programming Guide.
One of those steps is
It unarchives the nib object graph data and instantiates the objects.
Then almost finally it does:
It sends an awakeFromNib message to the appropriate objects in the nib file that define the matching selector: ... In iOS, this message is sent only to the interface objects that were instantiated by the nib-loading code. It is not sent to File’s Owner, First Responder, or any other proxy objects.
The first method you can get a grip on is awakeFromNib
.
To answer your three questions: