Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
You seem to have forgotten the + and - signs in front of the methods names:

+initialize initialises a Class (not an instance)

-init initialises and instance

-awakeFromNib initialises a de-serialised instance being created from a nib.

The last two are different as in the latter you can be sure any outlets connected in the nib are connects but this is not true in the former.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I didn't understand what do u mean by "you can be sure any outlets connected in the nib are connects" in your response

Exactly what I said. If you create an instance of this object in nib file then any outlets will not be connected when init gets called but will be when awakeFromNib is called.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.