• 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: Kyle Sluder <email@hidden>
  • Date: Thu, 03 Mar 2011 08:57:00 -0800

On Thu, Mar 3, 2011 at 4:37 AM, Andreas Grosam <email@hidden> wrote:
> At the time awakeFromNib is sent to the root view controller, the root view controller's outlets whose target exists in the main nib are connected. However, none of the outlets whose target objects exist in its corresponding nib "MyRootViewController nib" are connected.
>
> There is nothing in the docs mentioning this case.

-awakeFromNib is sent to every object in the nib after all the
connections defined in the nib have been established. Since cross-nib
connections are not allowed, the documentation has no need to mention
your scenario.

Perhaps the documentation should be rephrased to say "all connections
defined in the nib are guaranteed to have been reestablished" rather
than guaranteeing that all outlets have been connected, which is
inaccurate.

On Thu, Mar 3, 2011 at 4:27 AM, Andreas Grosam <email@hidden> wrote:
> When -awakeFromNib is sent to the root view controller, the outlet 'testView' is not connected. The message is sent during *loading the main nib*. The root view controller does not receive another -awakeFromNib message.

>From the Resource Programming Guide:

"In iOS, this message [-awakeFromNib] 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."

So the answer to your problem is use the UIViewController methods to
find out when your RootViewController has loaded its view.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Outlets Not Connected In awakeFromNib
      • From: Andreas Grosam <email@hidden>
References: 
 >Outlets Not Connected In awakeFromNib (From: Andreas Grosam <email@hidden>)
 >Re: Outlets Not Connected In awakeFromNib (From: glenn andreas <email@hidden>)
 >Re: Outlets Not Connected In awakeFromNib (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: The 'Open with' option is automatically changed with my app when my app is installed
  • Next by Date: Re: Help with simple NSView animation...
  • Previous by thread: Re: Outlets Not Connected In awakeFromNib
  • Next by thread: Re: Outlets Not Connected In awakeFromNib
  • Index(es):
    • Date
    • Thread