Instance Method

beginSheet(with:modalFor:delegate:didEnd:contextInfo:)

Presents a page setup sheet for the given NSPrintInfo object, document-modal relative to the given window.

Declaration

func beginSheet(with printInfo: NSPrintInfo, modalFor docWindow: NSWindow, delegate: Any?, didEnd didEndSelector: Selector?, contextInfo: UnsafeMutableRawPointer?)

Parameters

printInfo

The NSPrintInfo object to use.

docWindow

The window to which the sheet is attached.

delegate

The delegate to which didEndSelector is sent. Can be nil.

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.

See Also

Running a Page Setup Dialog

func runModal()

Displays the receiver and begins the modal loop using the shared NSPrintInfo object.

func runModal(with: NSPrintInfo)

Displays the receiver and begins the modal loop using the given NSPrintInfo object.