Created
September 5, 2020 02:04
-
-
Save kernjackson/388bc180d6526c99a4ba8d483336f5b8 to your computer and use it in GitHub Desktop.
SwiftUI BlurView (Wrapped)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct BlurView: UIViewRepresentable { | |
| var style: UIBlurEffect.Style | |
| init(_ style: UIBlurEffect.Style) { | |
| self.style = style | |
| } | |
| func makeUIView(context: Context) -> UIVisualEffectView { | |
| let view = UIVisualEffectView(effect: UIBlurEffect(style: style)) | |
| return view | |
| } | |
| func updateUIView(_ uiView: UIVisualEffectView, context: Context) { } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment