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

# runModal()

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

## Declaration

```swift
func runModal() -> Int
```

## Return Value

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

## Discussion

Discussion The receiver’s values are recorded in the shared NSPrintInfo object.

## 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(with:)](appkit/nspagelayout/runmodal(with:).md)
