I’m looking for an explanation of NSWindow’s dragImage method.
- (void)dragImage:(NSImage *)image at:(NSPoint)imageLocation offset:(NSSize)pointerOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pasteboard source:(id)sourceObject slideBack:(BOOL)slideBack
Any help?
The NSView documentation of that method provides a much more detailed explanation, including example code. The only difference between the two methods is the coordinate system that
imageLocationis in. Find it at http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-SW135Edit: Here is the sample code from that link, with added comments.
The source object (self in this case) needs to implement the NSDraggingSource protocol. You may also be interested in the NSPasteboard Class Reference.