SwiftUIBlurView lets you use UIBlurEffect
in SwiftUI. This gives you access to system blur effects like .regular
, .prominent
, .systemMaterial
.
To blur any SwiftUI view, just use the systemBlur
modifier:
Image("photo")
.frame(width: 200, height: 200)
.systemBlur(style: .prominent)
}
The result looks like this:
This project contains a demo app that shows all available system blur styles. To run the demo app, just open and run the SwiftUIBlurView.xcodeproj
project.
https://github.com/danielsaidi/SwiftUIBlurView.git
pod "SwiftUIBlurView"
github "danielsaidi/SwiftUIBlurView"
Feel free to reach out if you have questions or if you want to contribute in any way:
SwiftUIBlurView is available under the MIT license. See LICENSE file for more info.