简体   繁体   中英

swift 3 .all was deprecated - drag and drop nstableview

I have a working NSTableView drag and drop solution. but I get a warning message for this code part:

func tableView(_ tableView: NSTableView, validateDrop info: NSDraggingInfo, proposedRow row: Int, proposedDropOperation operation: NSTableViewDropOperation) -> NSDragOperation {
        if operation == .above {
            return .move
        }
        return .all
    }

'all' was deprecated in OS X 10.10

what I have to use instead of .all ?

From the documentation :

The NSDragOperationAll constant is deprecated. Use every instead.

Therefore, use:

return .every

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM