<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFUserNotificationSecureTextField(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFUserNotificationSecureTextField"
  },
  "title" : "CFUserNotificationSecureTextField(_:)"
}
-->

# CFUserNotificationSecureTextField(_:)

Returns a flag used to set the secure state of a text field.

```
func CFUserNotificationSecureTextField(_ i: CFIndex) -> CFOptionFlags
```

## Parameters

`i`

The index of the text field to make secure. The index corresponds to the order in which the text fields are listed in the [`kCFUserNotificationTextFieldTitlesKey`](/documentation/CoreFoundation/kCFUserNotificationTextFieldTitlesKey) array of the user notification’s description dictionary. `idx` must be in the range 0 to 7.

## Return Value

A flag that can be used to set the secure state of a text field when creating a user notification with [`CFUserNotificationCreate(_:_:_:_:_:)`](/documentation/CoreFoundation/CFUserNotificationCreate(_:_:_:_:_:)).

---

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)