NSPageLayout is a panel that queries the user for information such as paper type and orientation. It is normally displayed in response to the user selecting the Page Setup menu item. You obtain an instance with the pageLayout class method. The pane can then be run as a sheet using beginSheet(with:modalFor:delegate:didEnd:contextInfo:) or modally using runModal() or runModal(with:).


Running a Page Setup Dialog

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

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

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.

Customizing the Page Setup Dialog

func addAccessoryController(NSViewController)

Adds the given controller of an accessory view to be presented in the page setup panel.

func removeAccessoryController(NSViewController)

Removes the given controller of an accessory view.

var accessoryControllers: [NSViewController]

An array of accessory view controllers belonging to the receiver.

Accessing the NSPrintInfo Object

var printInfo: NSPrintInfo?

The NSPrintInfo object used when the receiver is run.


Inherits From

Conforms To