• 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
Adding custom view in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding custom view in IB


  • Subject: Adding custom view in IB
  • From: Luc Van Bogaert <email@hidden>
  • Date: Thu, 14 Apr 2011 23:34:34 +0200

Hi,

I know how to subclass NSView to create a custom view, and add it to a window as a subview using interface builder.  But when I want to control my custom view with a viewcontroller object, both contained in a seperate nib file, I'm getting a bit confused about how I can use IB to do the same.

For now, I am adding my custom view, which is loaded from the nib file when instantiating the view controller, to another view programmatically. This works, but I find it's getting too hard having to recalculate the custom view's  frame whenever the program window size has changed.

So I would like to keep using IB to add my custom view to its "container", and benefit from the sizing and location attributes IB has to offer. How do I go about to using the custom view, its nib file and the view controller in IB? Could someone please point me in the right direction?

Thanks,
--
Luc Van Bogaert
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

  • Follow-Ups:
    • Re: Adding custom view in IB
      • From: Vyacheslav Karamov <email@hidden>
  • Prev by Date: Re: Anybody using NSFileManager here?
  • Next by Date: Re: Lockless thread-safe accessor using blocks: how to?
  • Previous by thread: Re: Anybody using NSFileManager here?
  • Next by thread: Re: Adding custom view in IB
  • Index(es):
    • Date
    • Thread