On Mar 3, 2011, at 3:31 AM, Uli Kusterer wrote:

> On 02.03.2011, at 10:54, Andreas Grosam wrote:
>> I have a very basic custom UIViewController with its own associated nib 
>> file. This view controller is the "root view controller" of a Navigation 
>> Controller which is itself embedded within a Split View Controller which is 
>> defined in another nib - say the main.nib.
> 
> tl;dr
> 
> But do you have any objects that are part of several NIBs? I.e. a view 
> controller that is instantiated by one NIB, but the view controller has a NIB 
> of its own that it loads in turn? In that case, you'll get -awakeFromNib 
> twice. Once when the containing NIB is instantiated, and a second time after 
> you load the containED NIB.

Good explanation, and that's true on Mac OS X, but on iOS objects that aren't 
created by loading the NIB aren't sent the awakeFromNib message. So the file's 
owner of a NIB doesn't get the awakeFromNib message. It should just do the work 
it's interested in after the nib is loaded. UIViewController provides that hook 
with viewDidLoad.

Jon Hess

> 
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.masters-of-the-void.com
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/jhess%40apple.com
> 
> This email sent to jh...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to