When i set the cursor using
- (void)draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint {
[[NSCursor closedHandCursor] set];
}
than very soon after it switches back to the default cursor
During drag the cursor rects seems disables
How to set the cursor during drag & drop operation?
As well as using set to change the cursor, you can also use the NSCursor methods push and pop - these don't rely on cursor rects. You simply push when you need to set a new cursor, and pop when you want to get back to the cursor being used just before your push call. In your example, try using push when the drag begins, and pop in the delegate method that informs you when the drag is ended.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With