NSOpenPanel as sheet
问题 Ive looked around at other answers, but nothing seems to be helping my case. I have a viewController class which contains an IBAction for a button. This button should open a NSOpenPanel as a sheet from that viewController: class ViewController: NSViewController { @IBAction func folderSelection(sender: AnyObject) { var myFiledialog: NSOpenPanel = NSOpenPanel() myFiledialog.prompt = "Select path" myFiledialog.worksWhenModal = true myFiledialog.allowsMultipleSelection = false myFiledialog