0

I have a custom myCustomNSView class. I have also created a nib file for it. How do i link the two together so that i can instantiate the myCustomNSView class and add it as a subview of some other view? The answer provided by this question is perfect except, I am working with OSX not iOS.

Looking at Apple's documentation i see the following:

enter image description here

How can this be done for OSX?

Community
  • 1
  • 1
Just a coder
  • 15,480
  • 16
  • 85
  • 138

1 Answers1

0

If you look into the header NSNib.h, you will see that the new official method is:

- (BOOL)instantiateWithOwner:(id)owner topLevelObjects:(NSArray **)topLevelObjects 

It is the Very same as for UIKit. I have no idea, why it is so poorly documented.

Matthias
  • 8,018
  • 2
  • 27
  • 53