2017-05-31 56 views
0

我有一个工作NSTableView拖放解决方案。 但我得到一个警告信息,这部分代码:swift 3 .all已被弃用 - 拖放nstableview

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

'所有' 是在OS X 10.10

弃用我有什么,而不是使用.all

回答

2

documentation

NSDragOperationAll常数已被弃用。改为使用every

因此,使用:

return .every 
+0

非常感谢你:) – Ghost108