Reputation: 64844
I'm currently using NSView print: method. I'm customizing my view for printing, but I would like to restore previous settings when the print is finished.
How can I know when a print operation is committed or canceled ?
thanks
Upvotes: 0
Views: 162
Reputation: 21249
After you create your NSPrintOperation
, use -runOperationModalForWindow:delegate:didRunSelector:contextInfo:
to run it with a specified delegate (to restore the previous settings) to be called when the print operation is completed.
The "Printing Programming Topics for Cocoa" guide has an example of how to do this.
Upvotes: 2