• 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: Confusion about NIB loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusion about NIB loading


  • Subject: Re: Confusion about NIB loading
  • From: Rob Keniger <email@hidden>
  • Date: Wed, 24 Jun 2009 23:26:35 +1000


On 24/06/2009, at 11:20 PM, Chris Idou wrote:

Since the doco for loadNibNamed:owner: says that it looks in the bundle "associated"
with the owner, I'm creating an object of a class that exists in the subframework to pass as the owner.


However, it doesn't find the NIB. Am I understanding correctly what it means
for a bundle to be "associated" with a class?


To get the bundle for the class, you need to use [NSBundle bundleForClass:[YourClass class]]. You can then load the nib by calling loadNibNamed:owner:.

The parameter passed as the owner in that method will be the object that is File's Owner in the nib.

--
Rob Keniger



_______________________________________________

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: Confusion about NIB loading
      • From: Chris Idou <email@hidden>
References: 
 >Confusion about NIB loading (From: Chris Idou <email@hidden>)

  • Prev by Date: Confusion about NIB loading
  • Next by Date: Re: Screen capture Cocoa framework
  • Previous by thread: Confusion about NIB loading
  • Next by thread: Re: Confusion about NIB loading
  • Index(es):
    • Date
    • Thread