• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Outlets Not Connected In awakeFromNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outlets Not Connected In awakeFromNib


  • Subject: Re: Outlets Not Connected In awakeFromNib
  • From: Jonathan Hess <email@hidden>
  • Date: Wed, 9 Mar 2011 20:17:38 -0800

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 (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

References: 
 >Outlets Not Connected In awakeFromNib (From: Andreas Grosam <email@hidden>)
 >Re: Outlets Not Connected In awakeFromNib (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Cocoaheads Lake Forest meeting TONIGHT, 7pm, El Toro library
  • Next by Date: Finding network mounted DVDs
  • Previous by thread: Re: Outlets Not Connected In awakeFromNib
  • Next by thread: Re: Outlets Not Connected In awakeFromNib
  • Index(es):
    • Date
    • Thread