Hi Dragan, I was faced with the same issue, and came across your posting while searching for an approach. I want to drag whole-row images regardless of which column was targeted by the mouse. Building on techniques described at https://www.mail-archive.com/cocoa-dev%40lists.apple.com/msg108722.html (for some reason this web app won't let me format that as a link) and here, I came up with this: func tableView(_ tableView: NSTableView, draggingSession session: NSDraggingSession, willBeginAt screenPoint: NSPoint, forRowIndexes rowIndexes: IndexSet) { session.enumerateDraggingItems(options: .concurrent, for: nil, classes: [NSPasteboardItem.self], searchOptions: [:]) { (draggingItem, index, stop) in // Get the row index for this drag item. Could cheat and map `index` to `rowIndexes`, but this is cleaner. guard let pasteboardItem = draggingItem.item as? NSPasteboardItem, let rowIndex = pasteboardItem.propertyList(forType: com.example.RowIndexPasteboardType) as? Int else { stop.pointee = true return } // Co
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: