5
votes

I have an app where I allow the user to drag/drop some data from an NSView, with a custom drag image under the cursor.

I just updated to the Xcode 6 beta, and now my drag/drop code won't compile. This is because Apple has deprecated the following NSView method:

dragImage:at:offset:event:pasteboard:source:slideBack:

Fine, but what am I supposed to use instead? All the Apple documentation I've found still merrily recommends the deprecated method.

There is also a "dragFile:" method, however my NSView represents AV data, and it's unsuitable to write a large new file to disk every time the user begins a drag. The user may well to abort the drag, possibly multiple times in rapid succession.

What is the new way to initiate a drag operation with a custom icon?

1
Ask that at Apple's forums.El Tomato

1 Answers

1
votes

Thanks to Kyle Sluder on Apple's Dev forums for alerting me to this. It turns out the replacement is

NSView beginDraggingSessionWithItems: event: source: