Re: initWIthFrame or awakeFromNib

2009-05-14 Thread Jonathan Hess
On May 13, 2009, at 9:32 PM, Joar Wingfors wrote: ...to follow up on that a bit: When you're instantiated from nib loading you will not see "-initWithFrame:" being called, but rather "-initWithCoder:". You can read more about that in the NSCoding & Nib Loading documentation. Depending on

Re: initWIthFrame or awakeFromNib

2009-05-13 Thread Joar Wingfors
...to follow up on that a bit: When you're instantiated from nib loading you will not see "-initWithFrame:" being called, but rather "- initWithCoder:". You can read more about that in the NSCoding & Nib Loading documentation. You can in a case like this implement both "-initWithFrame:" and

Re: initWIthFrame or awakeFromNib

2009-05-13 Thread Luke the Hiesterman
If you have some initialization that needs to be done from multiple init points, it's common to create a method for this, say commonSetup. Then in all init paths, you would do [self commonSetup]. Luke On May 13, 2009, at 4:56 PM, Ramakrishna Vavilala wrote: I have a custome view class which

initWIthFrame or awakeFromNib

2009-05-13 Thread Ramakrishna Vavilala
I have a custome view class which I use to host some CALayers. As I specify the view in the Nib file, I use awakeFromNib to create the CALayers. Part of me however thinks that initWithFrame might be more suitable for this initialization as it can be used for views created outside of interface build