Instance Method


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


- (void)beginCriticalSheet:(NSWindow *)sheetWindow completionHandler:(void (^)(NSModalResponse returnCode))handler;



The window object that represents the critical sheet to present. A critical sheet contains content that is time-critical or very important to the user.


The completion handler that gets called when the sheet’s modal session ends.


This method displays the sheet—on top of the window’s current sheet, if one exists—makes it key and returns control to the caller. While the sheet remains visible, most events targeted at the receiver are prohibited. The runloop does not enter any special mode to accomplish this.

If the window already has a sheet when this method runs, the existing sheet is temporarily disabled while the critical sheet is presented. When the critical sheet is dismissed, the previously presented sheet continues its standard operation.

See Also

Managing Sheets


The sheet attached to the window.


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.

- endSheet:

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

- endSheet:returnCode:

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


The window to which the sheet is attached.


An array of the sheets currently attached to the window.