runModalPrintOperation(_:delegate:didRun:contextInfo:)
Runs the specified print operation modally.
Declaration
func runModalPrintOperation(_ printOperation: NSPrintOperation, delegate: Any?, didRun didRunSelector: Selector?, contextInfo: UnsafeMutableRawPointer?)Parameters
- printOperation:
The print operation to run.
- delegate:
The delegate to which the selector message is sent.
- didRunSelector:
The selector of the message sent to the delegate.
- contextInfo:
Object passed with the callback to provide any additional context information.
Discussion
Overrides of printShowingPrintPanel: can invoke this method.
When the panel is dismissed, delegate is sent a didRunSelector message. Pass the contextInfo object with the callback. The didRunSelector callback method should have the following signature:
- (void)documentDidRunModalPrintOperation:(NSDocument *)document success:(BOOL)success contextInfo:(void *)contextInfo