blob: a2452c96e52551523fa0a99f6cf0ea31296b03d9 (
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 © 2025 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
}
}
|