<!--
{
  "availability" : [
    "macOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetoothUI",
  "identifier" : "/documentation/IOBluetoothUI/IOBluetoothDeviceSelectorController/setCancel(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOBluetooth UI"
    ],
    "preciseIdentifier" : "c:objc(cs)IOBluetoothDeviceSelectorController(im)setCancel:"
  },
  "title" : "setCancel(_:)"
}
-->

# setCancel(_:)

Sets the title of the default/cancel button in the device selector panel.

```
func setCancel(_ prompt: String!)
```

## Parameters

`prompt`

String that appears in the default/cancel button in the device selector panel.

## Discussion

The prompt text should be localized for best user experience.

NOTE: This method is only available in macOS 10.9 or later.

---

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)