---
title: "privacySensitive(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/controlwidgettemplate/privacysensitive(_:)"
---

# privacySensitive(_:)

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

## Declaration

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

```

## Parameters

- `sensitive`: A Boolean value that determines whether this control is sensitive.

## Discussion

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(_:) 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()         }     } }
