endSheet(_:returnCode:)
Ends a document-modal session and dismisses the specified sheet.
Declaration
func endSheet(_ sheetWindow: NSWindow, returnCode: NSApplication.ModalResponse)Parameters
- sheetWindow:
The window object that represents the sheet to dismiss.
- returnCode:
The return code to send to the completion handler. You can use a custom value that you define or one of the return codes defined in the Modalresponse enumeration or
Additional NSModalResponse Values.
Discussion
This method ends the modal session with the specified return code.