Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Adding custom view in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding custom view in IB


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?

Luc Van Bogaert


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)

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.