Lucas Brown 5 жил өмнө
parent
commit
35ab10b0cd

+ 11 - 10
Sources/SwiftUIVisualEffects/View Modifiers/BlurEffectModifier.swift

@@ -8,24 +8,25 @@ import SwiftUI
 /// Creates a blur effect.
 public struct BlurEffectModifier: ViewModifier {
 	public init() {}
-	
+
 	public func body(content: Content) -> some View {
 		content.overlay(_BlurVisualEffectViewRepresentable())
 	}
 }
 
-fileprivate struct _BlurVisualEffectViewRepresentable: UIViewRepresentable {
-	func makeUIView(context: Context) -> UIVisualEffectView {
-		UIVisualEffectView(effect: UIBlurEffect(style: context.environment.blurEffectStyle))
-	}
-	
-	func updateUIView(_ uiView: UIVisualEffectView, context: Context) {}
-}
-
+/// Creates a blur effect.
 public struct BlurEffect: View {
 	public init() {}
-	
+
 	public var body: some View {
 		_BlurVisualEffectViewRepresentable()
 	}
 }
+
+fileprivate struct _BlurVisualEffectViewRepresentable: UIViewRepresentable {
+	func makeUIView(context: Context) -> UIVisualEffectView {
+		UIVisualEffectView(effect: UIBlurEffect(style: context.environment.blurEffectStyle))
+	}
+
+	func updateUIView(_ uiView: UIVisualEffectView, context: Context) {}
+}