Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
Is there any tutorials that show you how to load a NSView into a CustomView ? As I would like to be able to use this as it seems a cleaner way to organize things.
 

Nutter

macrumors 6502
Mar 31, 2005
432
0
London, England
The "Custom View" item in Interface Builder is actually just a placeholder. When the nib gets loaded your custom view is instantiated in place of the custom view placeholder in the nib.

So, all you need to do is create your NSView subclass in Xcode, and then enter its class name into the attributes of the custom view in Interface builder.
 

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
The "Custom View" item in Interface Builder is actually just a placeholder. When the nib gets loaded your custom view is instantiated in place of the custom view placeholder in the nib.

So, all you need to do is create your NSView subclass in Xcode, and then enter its class name into the attributes of the custom view in Interface builder.

Thanks for that. You clear explanation made it make sense to me, I couldn't find and explanation about it on the internet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.