---
title: "runModal(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspagelayout/runmodal(with:)"
---

# runModal(with:)

Displays the page layout panel and begins the modal loop using the specified print info object.

## Declaration

```swift
func runModal(with printInfo: NSPrintInfo) -> Int
```

## Parameters

- `printInfo`: The NSPrintInfo object to use.

## Return Value

Return Value NSCancelButton if the user clicks the Cancel button; otherwise, NSOKButton.

## Discussion

Discussion The receiver’s values are recorded in printInfo.

## See Also

### Running the page setup dialog

- [beginSheet(using:on:completionHandler:)](appkit/nspagelayout/beginsheet(using:on:completionhandler:).md)
- [beginSheet(with:modalFor:delegate:didEnd:contextInfo:)](appkit/nspagelayout/beginsheet(with:modalfor:delegate:didend:contextinfo:).md)
- [runModal()](appkit/nspagelayout/runmodal().md)
