Skip to content

Commit 3d3a3d2

Browse files
committed
docs(07): explain asymmetric privacy-mask animation
1 parent 4033497 commit 3d3a3d2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

AppPackage/Sources/AppComponents/ViewModifiers.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public struct PrivacyMaskModifier: ViewModifier {
1212

1313
public func body(content: Content) -> some View {
1414
content
15+
// Asymmetric on purpose: apply the mask instantly (`blur != 0`) but ease it out.
16+
// The blur is written on `.inactive`, exactly when iOS grabs the App Switcher
17+
// snapshot — a ramp-in would let that snapshot capture unblurred content. Only the
18+
// return-to-active fade (`blur == 0`) is animated, and Reduce Motion skips both.
1519
.animation(reduceMotion || blur != 0 ? nil : .linear(duration: 0.1)) {
1620
$0.blur(radius: blur)
1721
}

0 commit comments

Comments
 (0)