<!--
{
  "availability" : [
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKInterfaceTextField/setSecureTextEntry(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKInterfaceTextField(im)setSecureTextEntry:"
  },
  "title" : "setSecureTextEntry(_:)"
}
-->

# setSecureTextEntry(_:)

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

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

## Discussion

Pass <doc://com.apple.documentation/documentation/Swift/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.

---

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)