Adding custom view in IB
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