2

Can I load an NSViewController with its view and all the subvews from a Nib file as I usually do in UIKit with initWithNibName:bundle:? In AppKit I can load an NSWindowController with that message, but if I try to load an NSViewController, although the view is not nil, it won't show. Is there a known way to do this?

EDIT: It works if I add the view programmatically with addSubview:, it doesn't if I use an outlet to a custom view in the main nib and then replace.

Michele De Pascalis
  • 932
  • 2
  • 9
  • 26

1 Answers1

0

Maybe the problem is that when you are trying to load a view this way, it gets just 'lazy-loaded'.
You should try to access something from that view after that to get the view fully loaded and displayed.

heuels
  • 84
  • 1
  • 11