I am working on a xcode mac app using swift. I implemented Drag & Drop files to NSTableView and it works fine except after the drag and drop operation from the file system the window loses focus.
override func performDragOperation(sender: NSDraggingInfo) -> Bool {
let thefilesNSArray = sender.draggingPasteboard().propertyListForType(NSFilenamesPboardType) as! NSArray
let theFiles = thefilesNSArray as AnyObject as! [String]
let pageDict = ["key": theFiles]
return false
}
How to i set focus to the App after the drag operation is complete?
I am able to do it easily
i have to return true instead of false