drawPrintFormatter(_:forPageAt:)
Performs custom drawing in addition to the specified print formatter’s drawing for a page.
Declaration
func drawPrintFormatter(_ printFormatter: UIPrintFormatter, forPageAt pageIndex: Int)Parameters
- printFormatter:
A Uiprintformatter object associated with the page at
pageIndex. - pageIndex:
The index of the page for
printFormatterto draw on.
Discussion
The system invokes this method for each print formatter associated with the specified page. The default implementation invokes the draw(in:forPageAt:) method of each UIPrintFormatter object.
Override this method to intermix custom drawing with the formatter drawing — for example, by adding an overlay or underlay graphic. Call draw(in:forPageAt:) to have the print formatter draw its portion of the page.
The system configures this method for drawing to the current graphics context according to UIGraphicsGetCurrentContext().