<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ControlWidgetTemplate/privacySensitive(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21ControlWidgetTemplateP0D3KitE16privacySensitiveyQrSbF"
  },
  "title" : "privacySensitive(_:)"
}
-->

# privacySensitive(_:)

Marks the control template as containing sensitive, private user data.

```
@MainActor @preconcurrency func privacySensitive(_ sensitive: Bool = true) -> some ControlWidgetTemplate
```

## Parameters

`sensitive`

A Boolean value that determines whether this
control is sensitive.

## Discussion

The system redacts controls marked with this modifier when those
controls are displayed on the Lock Screen and the device is locked.

Controls also respect the [`privacySensitive(_:)`](/documentation/SwiftUI/View/privacySensitive(_:)) modifier
applied to the control’s label. That modifier only redacts the
control content, however. To redact the content *and* the state of the
control, apply this modifier to the control template:

```
struct GarageDoorOpener: ControlWidget {
    var body: some ControlWidgetConfiguration {
        StaticControlConfiguration(...) {
            ControlWidgetToggle(...) {
                Label(
                    $0 ? "Open" : "Closed",
                    systemImage: $0 ? "door.open" : "door.closed"
                )
            }
            .privacySensitive()
        }
    }
}
```

---

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)