How do I put a view in a window so that the WindowController (ie: Files Owner) of the window can communicate with the custom view?
• select Classes tab • select NSView in the list of classes • choose Classes – Subclass NSView • name youre view (eg: AndyView • choose Classes – Create Files for AndyView • make sure the file browser that appears points to your project root or suitable subdir and the project is checked in the Insert Into Targets list on the save dialog in Interface Builder, to add your custom view to a window • make the Window visible • click on the Cocoa-Containers panel in the Palettes window (icon is a tab panel, the 6th along) • drag a CustomView onto the window • resize as desired • bringup the Info panel for your Custom View to link the view so it is programmatically addressable from the window controller: • add an outlet member variable to the controller, eg: IBOutlet AndyView* importantView; • save these changes • in Interface Builder:
Related Questions
- Im having trouble selecting files from the Thumbnails tile window to view in Focus. How can I select either one channel to view in BW or three channels to view in an RGB composite?
- How do I put a view in a window so that the WindowController (ie: Files Owner) of the window can communicate with the custom view?
- How can I view .h5 files on Snow Leopard or 64-bit Window?