Read the drag and drop programming topics for Cocoa . You want your custom view to be a "drag and drop destination." You will need to understand the types of cardboard and file paths, how to subclass the view (a generic NSView for your own custom class, or an existing view such as NSImageView) and add appropriate drag and drop methods.
source share