Re: Multiple Observations
Re: Multiple Observations
- Subject: Re: Multiple Observations
- From: Seth Willits <email@hidden>
- Date: Sat, 15 Jun 2013 10:16:02 -0700
Adding onto what's been said already, even without the view-based tableview case, the fact that awakeFromNib can be called multiple times is why I generally never use it. Yeeears ago I was bitten by a view controller subclass have its awakeFromNib being called twice because it was instantiated in a nib and loaded another nib. (Although I avoid it now, I suspect this pattern is going to become more common like it already is on iOS — see the case of popovers in nibs.) This is why in every view controller subclass I never use awakeFromNib, but instead override loadView and do work there after calling super.
(I haven't though through it all, but off the top of my head I don't think I can think of any reason why awakeFromNib would actually ever be the "correct" place to put code?)
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden