Instance Method

rectForPage(at:)

Returns the area enclosing a specified page of content.

Declaration

func rectForPage(at pageIndex: Int) -> CGRect

Parameters

pageIndex

The index number of a page.

Return Value

A rectangle enclosing the content area for page pageIndex.

Discussion

Returns CGRectZero if the print formatter draws no content on the specified page.

See Also

Drawing the Content

func draw(in: CGRect, forPageAt: Int)

Draws the portion of a print formatter’s content that goes in the given area for the specified page