Using Swift, how can I get the x-coordinate of an NSTableColumn while it is being dragged

44 Views Asked by At

I've tried using KVO on NSTableHeaderView.draggedDistance but didn't get anywhere - I might be incorrect but I assume because it is a computed property. NSTableView has .rect(ofColumn:) but as far as I'm aware this is also not something I can track. tableViewColumnDidMove(_ notification: Notification) only triggers once the column is released and func tableView(_ tableView: NSTableView, shouldReorderColumn columnIndex: Int, toColumn newColumnIndex: Int) -> Bool only runs when the column index changes positions (for instance, when column index 2 becomes column index 3), not while its position value (in points/pixels) changes. Any pointers?

0

There are 0 best solutions below