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

# runModal(with:)

Displays the Print panel and runs the modal loop using the specified printing information.

## Declaration

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

## Parameters

- `printInfo`: The printing information to use while displaying the Print panel.

## Return Value

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

## See Also

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