struct BackgroundBlurView: UIViewRepresentable{
func makeUIView(context: Context) -> some UIView {
let view = UIVisualEffectView(effect: UIBlurEffect(style: .systemUltraThinMaterialDark))
DispatchQueue.main.async{
view.superview?.superview?.backgroundColor = .clear
}
return view
}
func updateUIView(_ uiView: UIViewType, context: Context) { }
}
{ ... }
.background(BackgroundBlurView())