blob: f28b715065668f577ca48d0150af6750f4448a34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//
// VisualEffectView.swift
// MullvadVPN
//
// Created by Jon Petersson on 2024-12-04.
// Copyright © 2024 Mullvad VPN AB. All rights reserved.
//
import SwiftUI
struct VisualEffectView: UIViewRepresentable {
var effect: UIVisualEffect?
func makeUIView(context: UIViewRepresentableContext<Self>) -> UIVisualEffectView {
let view = UIVisualEffectView(effect: effect)
view.translatesAutoresizingMaskIntoConstraints = false
return view
}
func updateUIView(_ uiView: UIVisualEffectView, context: UIViewRepresentableContext<Self>) {
uiView.effect = effect
}
}
|