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

# setSecureTextEntry(_:)

Determines whether the text field hides the text entered by the user.

## Declaration

```swift
func setSecureTextEntry(_ secureTextEntry: Bool)
```

## Discussion

Discussion Pass true to help keep passwords and other secure data private. When you enable secure text entry, the system displays a series of dots instead of the text entered by the user.

## See Also

### Configuring the Control

- [setEnabled(_:)](watchkit/wkinterfacetextfield/setenabled(_:).md)
