Is it possible to use an object in a nib as a sort of template for dynamically creating multiple new objects?
Question
I would like to design an NSwindow with a WebView in IB for displaying popup links. I need to be able to instantiate any number of these. Is this possible?
Solution
Sure. Typically, your window controller would subclass NSWindowController.
MyWindowController* controller = [[MyWindowController alloc] initWithWindowNibName:@"MyWindowView"];
[controller showWindow];
In your nib, set the Owner to MyWindowController, then hook up your outlets as necessary.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow