How can you focus on a NSTableView order while dragging?

56 views Asked by At

When I drag an item to re-order the list, such as with Talkies Magazine below, I only like to see the bar where I can insert it, but now when I move an item to a new position and I move my cursor over an item, that whole item is blue as if I am dropping it on that item (see image).

How can I avoid such behavior and only see the blue line where the item would be inserted?

enter image description here

1

There are 1 answers

0
Mark On
func tableView(tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation dropOperation: NSTableViewDropOperation) -> NSDragOperation {
    if dropOperation == .Above {
        return .Move
    }
    return .None
}