<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextInputTraits/isSecureTextEntry",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextInputTraits(py)secureTextEntry"
  },
  "title" : "isSecureTextEntry"
}
-->

# isSecureTextEntry

A Boolean value that indicates whether a text object disables copying, and in some cases, prevents recording/broadcasting and also hides the text.

```
optional var isSecureTextEntry: Bool { get set }
```

## Discussion

This property is set to <doc://com.apple.documentation/documentation/Swift/false> by default. Setting this property to <doc://com.apple.documentation/documentation/Swift/true> in any view that conforms to [`UITextInputTraits`](/documentation/UIKit/UITextInputTraits) disables the user’s ability to copy the text in the view and, in some cases, also disables the user’s ability to record and broadcast the text in the view.

Setting this property to <doc://com.apple.documentation/documentation/Swift/true> in a [`UITextField`](/documentation/UIKit/UITextField) object additionally enables a password-style experience, in which the text being entered is obscured.

---

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)