Backport blur effect for iOS 14/macOS Big Sur

This commit is contained in:
Arkadiusz Fal
2022-01-06 15:58:16 +01:00
parent 4e88f2baf8
commit 520d69f37a
4 changed files with 197 additions and 20 deletions

View File

@@ -33,10 +33,10 @@ struct DetailBadge: View {
.background(.thinMaterial)
} else {
content
#if os(tvOS)
.background(Color.background(scheme: colorScheme))
#else
.background(Color.background.opacity(0.95))
#if os(macOS)
.background(VisualEffectBlur())
#elseif os(iOS)
.background(VisualEffectBlur(blurStyle: .systemThinMaterial))
#endif
}
}