Presents the panel as a sheet modal to the specified window.
- macOS 10.6+
The window in which the panel will be presented.
The block called after the user dismisses the panel. The argument passed in will be
NSFileif the user chose the OK button or
Handling Panel OKButton
NSFileif the user chose the Cancel button.
Handling Panel Cancel Button
Any properties of the panel you wish to set should be set before calling this method. Although the completion handler block is called after the user dismisses the panel, the panel sheet may still be visible onscreen. If you need to remove the sheet from the screen—for example, if the completion block displays an alert—first call
[save to close the sheet.