• 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: How to create a subview NIB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a subview NIB


  • Subject: Re: How to create a subview NIB
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 18 Feb 2005 09:58:24 -0600

On Friday, February 18, 2005, at 09:51AM, Mark Dawson <email@hidden> wrote:

>How do I create NIBs that are views destined to be programatically
>added in to a view (via the addSubView call)?  I don't want to have a
>window as a superview. I see I can create "Application", "empty",
>"Attention panel", "Inspector",  and "IB Palette" from a "New?".  I
>could create an "empty" NIB, but I'm not sure what I first drag in to
>create the view that contains that NIB's information (do I use the
>"custom view"?)?

Two methods come to mind.

(1) If you have a subclass of NSView, create an "empty" nib, then drag over the .h file.  In the nib window's classes tab, select the custom view class and choose Instantiate from the Classes menu.  This will add a new icon to your nib's instances view.  Select and set properties as appropriate.

(2) Drag an NSPanel from the palette to your nib.  Place your the contents of your view in the panel.  In this case, when you want to add the contents of the panel to your window, just obtain the panel's contentView.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to create a subview NIB
      • From: mark <email@hidden>
References: 
 >How to create a subview NIB (From: Mark Dawson <email@hidden>)

  • Prev by Date: How to create a subview NIB
  • Next by Date: Re: Listening to bindings
  • Previous by thread: How to create a subview NIB
  • Next by thread: Re: How to create a subview NIB
  • Index(es):
    • Date
    • Thread