The reasons to apply a redaction to data displayed on screen.
Members (5)
get · iOS 17.0+
invalidated
TypeScript
get invalidated(): RedactionReasons
Swift declaration
static let invalidated: RedactionReasons
Displayed data should appear as invalidated and pending a new update.
Views marked with ``View/invalidatableContent(_:)`` will be
automatically redacted with a standard styling indicating the content
is invalidated and new content will be available soon.
get · iOS 14.0+
placeholder
TypeScript
get placeholder(): RedactionReasons
Swift declaration
static let placeholder: RedactionReasons
Displayed data should appear as generic placeholders.
Text and images will be automatically masked to appear as
generic placeholders, though maintaining their original size and shape.
Use this to create a placeholder UI without directly exposing
placeholder data to users.
get · iOS 15.0+
privacy
TypeScript
get privacy(): RedactionReasons
Swift declaration
static let privacy: RedactionReasons
Displayed data should be obscured to protect private information.
Views marked with ``View/privacySensitive(_:)`` will be automatically
redacted using a standard styling. To apply a custom treatment the redaction
reason can be read out of the environment.
struct BankingContentView: View {
@Environment(\.redactionReasons) var redactionReasons
var body: some View {
if redactionReasons.contains(.privacy) {
FullAppCover()
} else {
AppContent()
}
}
}
init · iOS 14.0+
init
TypeScript
init(rawValue: number): RedactionReasons
Swift declaration
init(rawValue: Int)
Creates a new set from a raw value.
- Parameter rawValue: The raw value with which to create the
reasons for redaction.