Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 1, 2007, 03:38 PM   #1
MacDonaldsd
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Cocoa: NSView/Custom

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.
MacDonaldsd is offline   0 Reply With Quote
Old Sep 1, 2007, 04:50 PM   #2
Nutter
macrumors 6502
 
Join Date: Mar 2005
Location: 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.
Nutter is offline   0 Reply With Quote
Old Sep 2, 2007, 12:54 PM   #3
MacDonaldsd
Thread Starter
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Quote:
Originally Posted by Nutter View Post
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.
MacDonaldsd is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Trying to subclass NSView Hans Kamp Mac Programming 10 Aug 31, 2014 09:39 AM
Can I have my Cocoa app install custom iOS apps? Billy Boo Bob Mac Programming 11 Feb 8, 2014 09:47 PM
Custom NSView with subview of NSSplitView ArtOfWarfare Mac Programming 3 Aug 20, 2013 05:16 AM
Cocoa Application: Setting Custom Background Image ajbudis Mac Programming 1 Jul 22, 2013 11:42 AM
NSView and NSBezierPath - modelling free fall of an object moray95 Mac Programming 0 Mar 7, 2013 09:53 AM

Forum Jump

All times are GMT -5. The time now is 12:54 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC