<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecurityInterface",
  "identifier" : "/documentation/SecurityInterface/SFCertificatePanel/setAlternateButtonTitle(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Security Interface"
    ],
    "preciseIdentifier" : "c:objc(cs)SFCertificatePanel(im)setAlternateButtonTitle:"
  },
  "title" : "setAlternateButtonTitle(_:)"
}
-->

# setAlternateButtonTitle(_:)

Customizes the title of the alternate button.

```
func setAlternateButtonTitle(_ title: String!)
```

## Parameters

`title`

The new title for the alternate button. If this method is not called, or if `title` is set to `nil`, the button is not shown.

## Discussion

The alternate button is typically labelled “Cancel”. The alternate button dismisses the sheet or panel and returns a value of <doc://com.apple.documentation/documentation/AppKit/NSCancelButton>.

## See Also

[`func setDefaultButtonTitle(String!)`](/documentation/SecurityInterface/SFCertificatePanel/setDefaultButtonTitle(_:))

Customizes the title of the default button.

[`func runModal(for: SecTrust!, message: String!) -> Int`](/documentation/SecurityInterface/SFCertificateTrustPanel/runModal(for:message:))

Displays a modal panel that shows the results of a certificate trust evaluation and that allows the user to edit trust settings.



---

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)