|
@@ -6,7 +6,21 @@
|
|
import SwiftUI
|
|
import SwiftUI
|
|
|
|
|
|
public extension View {
|
|
public extension View {
|
|
- /// Sets the style for blur effects within this view.
|
|
|
|
|
|
+ /**
|
|
|
|
+ Sets the style for blur effects within this view.
|
|
|
|
+
|
|
|
|
+ To set a specific style for all blur effects and vibrancy effects containing blur effects within a view, use the blurEffectStyle(_:) modifier:
|
|
|
|
+ ```
|
|
|
|
+ ZStack {
|
|
|
|
+ backgroundContent
|
|
|
|
+ .blurEffect()
|
|
|
|
+
|
|
|
|
+ foregroundContent
|
|
|
|
+ .vibrancyEffect()
|
|
|
|
+ }
|
|
|
|
+ .blurEffectStyle(.systemMaterial)
|
|
|
|
+ ```
|
|
|
|
+ */
|
|
func blurEffectStyle(_ style: UIBlurEffect.Style) -> some View {
|
|
func blurEffectStyle(_ style: UIBlurEffect.Style) -> some View {
|
|
environment(\.blurEffectStyle, style)
|
|
environment(\.blurEffectStyle, style)
|
|
}
|
|
}
|