forked from sagnik/Project_Velocity
18 lines
457 B
Swift
18 lines
457 B
Swift
import SwiftUI
|
|
|
|
struct GlassBlurView: UIViewRepresentable {
|
|
let style: UIBlurEffect.Style
|
|
|
|
init(style: UIBlurEffect.Style = .systemUltraThinMaterial) {
|
|
self.style = style
|
|
}
|
|
|
|
func makeUIView(context: Context) -> UIVisualEffectView {
|
|
UIVisualEffectView(effect: UIBlurEffect(style: style))
|
|
}
|
|
|
|
func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
|
|
uiView.effect = UIBlurEffect(style: style)
|
|
}
|
|
}
|