<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPageLayout/runModal(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPageLayout(im)runModalWithPrintInfo:"
  },
  "title" : "runModal(with:)"
}
-->

# runModal(with:)

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

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

## Parameters

`printInfo`

The `NSPrintInfo` object to use.

## Return Value

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

## Discussion

The receiver’s values are recorded in `printInfo`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)