> 
> The resource programming guide explicitly describes the sending of
> -awakeFromNib as occurring after all outlets have been set up:
> 
> <https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/10000051i-CH4-SW18>
> 

[ oops didn't reply to the list ]

.. which is one of the things always bothered me when you load 
UIViewControllers + views from NIBs. In that NIB you usually have a 
UIViewController as file's owner, a view which is its view which has a load of 
subviews, plus some other top-level objects. Often some of the view's subviews 
are IBOutlets of the UIViewController, eg buttons you want to enable and 
disable etc. 

After awakeFromNib all the outlets are connected except for those to subviews 
of the UIViewController's view, they remain nil until after viewDidLoad. Other 
top-level object outlets are connected, but not the view nor its subviews. I 
always felt that broke the awakeFromNib contract; the objects are in the NIB, 
the outlets are in the NIB, surely they should be connected at awakeFromNib. 

_______________________________________________

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

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

Reply via email to