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

# setEnabled(_:)

Enables or disables the text field.

## Declaration

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

## Parameters

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

## Discussion

Discussion The enabled value determines whether the text field responds to user interaction. For enabled text fields, tapping the text field starts the text entry process. On watchOS, the system displays the text input controller. On nearby iOS devices associated with the same iCloud account, the system displays the Apple Remote Keyboard. A disabled text field does not respond to taps.

## See Also

### Configuring the Control

- [setSecureTextEntry(_:)](watchkit/wkinterfacetextfield/setsecuretextentry(_:).md)
