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

# runModal()

Displays the Print panel and begins the modal loop.

## Declaration

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

## Return Value

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

## Discussion

Discussion This method uses the printing information associated with the current printing operation.

## See Also

### Related Documentation

- [printInfo](appkit/nsprintoperation/printinfo.md)

### Running the Panel

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