---
title: "setEnabled(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacebutton/setenabled(_:)"
---

# setEnabled(_:)

Enables or disables the button.

## Declaration

```swift
func setEnabled(_ enabled: Bool)
```

## Parameters

- `enabled`: A Boolean value indicating whether the button is enabled or disabled.

## Discussion

Discussion When the user taps an enabled button, WatchKit executes the associated action method (if any) in your WatchKit extension code. A disabled button does not respond to taps in its content area.
