Cocoa: NSView/Custom

Discussion in 'Mac Programming' started by MacDonaldsd, Sep 1, 2007.

  1. macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #1
    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.
     
  2. macrumors 6502

    Joined:
    Mar 31, 2005
    Location:
    London, England
    #2
    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.
     
  3. thread starter macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #3
    Thanks for that. You clear explanation made it make sense to me, I couldn't find and explanation about it on the internet.
     

Share This Page