[CHANGE] Fixed the AppRowView background blur effect

This commit is contained in:
Fabian Thies
2022-12-12 19:20:54 +01:00
committed by Joe Mattiello
parent 378631e976
commit a0eb30f98e
2 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
//
// VisualEffectView.swift
// SideStore
//
// Created by Fabian Thies on 01.12.22.
// Copyright © 2022 SideStore. All rights reserved.
//
import SwiftUI
struct VisualEffectView: UIViewRepresentable {
let blurStyle: UIBlurEffect.Style
func makeUIView(context: Context) -> some UIView {
UIVisualEffectView(effect: UIBlurEffect(style: blurStyle))
}
func updateUIView(_ uiView: UIViewType, context: Context) { }
}
extension View {
@ViewBuilder
func blurBackground(_ style: UIBlurEffect.Style) -> some View {
self
.background(VisualEffectView(blurStyle: style))
}
}