Displays a Print panel sheet and runs it modally for the specified window.
- macOS 10.0+
The printing information for the current job.
The window on which to display the sheet.
A modal delegate object assigned to handle the closing of the Print panel sheet.
The selector to call on the modal delegate object when the sheet is dismissed. The signature of this method is listed in the Discussion section.
A pointer to context data the
didmethod needs to process the sheet. This data is user-defined and may be
When the modal session ends, if
did contain non-
nil values, the method specified by
did is invoked on the object in
modal. The data you specify in
context is passed as a parameter to the
did method. The object in
modal is not the same as a delegate assigned to the panel. Modal delegates for sheets are temporary and the relationship lasts only until the sheet is dismissed.
did argument must have the following signature:
The value passed as
return is either
NSOKButton. The value
NSOKButton is returned even if the user clicked the Preview button.