Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)
Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)
- Subject: Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)
- From: Roland King <email@hidden>
- Date: Thu, 07 Jul 2011 18:52:55 +0800
it's documented in "The NIB Object Life Cycle", a page you should have bookmarked!!
It sends an awakeFromNib message to the appropriate objects in the nib file that define the matching selector:
In Mac OS X, this message is sent to any interface objects that define the method. It is also sent to the File’s Owner and any proxy objects that define it as well.
In iOS, this message is sent only to the interface objects that were instantiated by the nib-loading code. It is not sent to File’s Owner, First Responder, or any other proxy objects.
On 07-Jul-2011, at 6:47 PM, vincent habchi wrote:
> Le 7 juil. 2011 à 11:43, Manfred Schwind <email@hidden> a écrit :
>
>> - On OS X all objects of the nib including the file's owner get an awakeFromNib.
>> - On iOS also all objects of the nib (including top-level objects!) but NOT the file's owner get an awakeFromNib.
>>
>> BTW, I can't find this documented somewhere.
>
> That's why this list is precious: to exchange pieces of experience not available elsewhere.
>
> BTW, I wonder if there is a historical reason beyond this. In my point of view, sending -awakeFromNib to the file's owner is superfluous, since the object responsible for the loading of the Nib has somehow to be already initialized…
>
> Vincent_______________________________________________
>
> 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
_______________________________________________
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