beginSheet(with:modalFor:delegate:didEnd:contextInfo:)
Presents a page setup sheet for the specified print info object, document-modal relative to the specified window.
Declaration
func beginSheet(with printInfo: NSPrintInfo, modalFor docWindow: NSWindow, delegate: Any?, didEnd didEndSelector: Selector?, contextInfo: UnsafeMutableRawPointer?)Parameters
- printInfo:
The
NSPrintInfoobject to use. - docWindow:
The window to which the sheet is attached.
- delegate:
The delegate to which
didEndSelectoris sent. Can benil. - didEndSelector:
The selector sent to the delegate. Can be
nil. - contextInfo:
Context information object passed with
didEndSelector.
Discussion
The didEndSelector argument must have the same signature as:
- (void)pageLayoutDidEnd:(NSPageLayout *)pageLayout returnCode:(int)returnCode contextInfo: (void *)contextInfo;The value passed as returnCode is either NSCancelButton or NSOKButton.