xcode - Opening NSSavePanel as sheet -
i using xcode7 beta2 play around swift 2. trying use file-selection dialog (nssavepanel
) brought me trouble.
running following code clicking associated button won't bring dialog sheet (not @ all) make window's decoration disappear, leaving in broken state otherwise functional sheets open dialogs without decoration. using call deprecated api beginsheetmodalforwindow
, in commented line, works expected.
@ibaction func openfileclicked(sender: anyobject) { let openpanel = nssavepanel() openpanel.cancreatedirectories = true //openpanel.beginsheetmodalforwindow(self.view.window!, completionhandler: { openpanel.beginsheet(self.view.window!, completionhandler: { (result) -> void in print("opening:\(result)" ) }) }
is code broken somehow or there issue api calling.
Comments
Post a Comment