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

Re: Adding custom view in IB


  • Subject: Re: Adding custom view in IB
  • From: Vyacheslav Karamov <email@hidden>
  • Date: Fri, 15 Apr 2011 10:33:13 +0300

15-Apr-11 00:34, Luc Van Bogaert пишет:
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,
If I understand you correctly, you should write Interface Builder plug-in, but plug-ins are supported by XCode prior to 4x.
_______________________________________________


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: 
 >Adding custom view in IB (From: Luc Van Bogaert <email@hidden>)

  • Prev by Date: Re: Searchable Cocoa and Carbon APIs?
  • Next by Date: Re: renaming directories and moving files into them (NSFileManager)
  • Previous by thread: Adding custom view in IB
  • Next by thread: NSBrowser Drag and Drop Issue !!
  • Index(es):
    • Date
    • Thread