---
title: "runModal(for:showGroup:)"
framework: securityinterface
role: symbol
role_heading: Instance Method
path: "securityinterface/sfcertificatepanel/runmodal(for:showgroup:)"
---

# runModal(for:showGroup:)

Displays a certificate chain in a modal panel.

## Declaration

```swift
func runModal(for trust: SecTrust!, showGroup: Bool) -> Int
```

## Parameters

- `trust`: A doc://com.apple.documentation/documentation/Security/SecTrust object associated with the certificate chain to display.
- `showGroup`: Specifies whether additional certificates (other than the leaf certificate) are displayed. To show only a single certificate, specify only one doc://com.apple.documentation/documentation/Security/SecCertificate in the array and set showGroup to doc://com.apple.documentation/documentation/Swift/false.

## Return Value

Return Value This method returns the integer constant NSOKButton when dismissed.

## See Also

### Displaying a Sheet or Panel

- [beginSheet(for:modalDelegate:didEnd:contextInfo:certificates:showGroup:)](securityinterface/sfcertificatepanel/beginsheet(for:modaldelegate:didend:contextinfo:certificates:showgroup:).md)
- [beginSheet(for:modalDelegate:didEnd:contextInfo:trust:showGroup:)](securityinterface/sfcertificatepanel/beginsheet(for:modaldelegate:didend:contextinfo:trust:showgroup:).md)
- [certificateView()](securityinterface/sfcertificatepanel/certificateview().md)
- [runModal(forCertificates:showGroup:)](securityinterface/sfcertificatepanel/runmodal(forcertificates:showgroup:).md)
