view LazyBear/Views/Global Helpers/BlurBackground.swift @ 424:6dd97877f575

Improve code, reorganize files
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sun, 13 Jun 2021 19:40:42 +0200
parents c206bd0bdb4e
children
line wrap: on
line source

//
//  BlurBackground.swift
//  LazyBear
//
//  Created by Dennis Concepción Martín on 24/4/21.
//

import SwiftUI

struct BlurBackground: UIViewRepresentable {
    var style: UIBlurEffect.Style
    
    func makeUIView(context: Context) -> UIVisualEffectView {
        return UIVisualEffectView(effect: UIBlurEffect(style: style))
    }
    
    func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
        uiView.effect = UIBlurEffect(style: style)
    }
}