I found out this:
applicationDidFinishLaunching (an delegate method of the UIApplicationDelegate Protocol) seems to be called BEFORE my views from the nib file are loaded completely. So I tried all the day to change an image of an UIImageView right after my app launched in the iPhone simulator, but nothing happened.
Then I wrote a little action method that I call with the press of a button. And then it happened: WORKS!
So the applicationDidFinishLaunching delegate method isn’t really the right place for stuff that has to be done after the app is really ‘ready’. I gues there’s something better that waits for the nib to be loaded completely. but where? and what?
For application specific things like global settings, preferences, etc.,
-appDidFinishLaunchingis the right place.For UIView specific things, you typically use the
-viewDidLoadmethod in a UIVIewController subclass. It is pretty much the only place you are guaranteed that the nib file is loaded, the IBOutlets are initialized and the IBActions are attached.This is difference from the Mac OS X world, where
-awakeFromNibwas the place to do it.