Instance Method

endSheet:returnCode:

Ends a document-modal session and dismisses the specified sheet.

Declaration

- (void)endSheet:(NSWindow *)sheetWindow returnCode:(NSModalResponse)returnCode;

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 NSModalResponse enumeration or Additional NSModalResponse Values.

Discussion

This method ends the modal session with the specified return code.

See Also

Managing Sheets

attachedSheet

The sheet attached to the window.

sheet

A Boolean value that indicates whether the window has ever run as a modal sheet.

- beginSheet:completionHandler:

Starts a document-modal session and presents—or queues for presentation—a sheet.

- beginCriticalSheet:completionHandler:

Starts a document-modal session and presents the specified critical sheet.

- endSheet:

Ends a document-modal session and dismisses the specified sheet.

sheetParent

The window to which the sheet is attached.

sheets

An array of the sheets currently attached to the window.