Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have written a custom view class that has two sub views, very similar to NSSplitView. I would like my new class to show up with two sub views when it is used in interface builder. The two subviews can be any NSView, but need to be specified by the developer.

How can I add my class to the Object Library?

How do I specify to IB that my class that it has two required subviews (IBoutlets)?

Thanks in advance, Joe

share|improve this question

1 Answer

up vote 0 down vote accepted

Beyond making the subview properties IBOutlets, it's not possible to customize the way Interface Builder presents custom classes in Xcode 4. It used to be possible in (standalone) Interface Builder before Xcode 4, but that functionality was removed.

share|improve this answer
Thanks for the response. I guess I can assert that the two views are not nil at runtime. – Joe Andolina Mar 26 at 22:54
Yes, that's a decent approach. Just make sure you log a good, descriptive statement when the assertion fails so that it's easy to figure out what's wrong. – Andrew Madsen Mar 26 at 22:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.