mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-12 00:54:24 +01:00
16 lines
490 B
Swift
16 lines
490 B
Swift
|
//
|
||
|
// VisualEffectView.swift
|
||
|
//
|
||
|
//
|
||
|
// Created by MainasuK on 2022/11/8.
|
||
|
//
|
||
|
|
||
|
import SwiftUI
|
||
|
|
||
|
// ref: https://stackoverflow.com/a/59111492/3797903
|
||
|
public struct VisualEffectView: UIViewRepresentable {
|
||
|
public var effect: UIVisualEffect?
|
||
|
public func makeUIView(context: UIViewRepresentableContext<Self>) -> UIVisualEffectView { UIVisualEffectView() }
|
||
|
public func updateUIView(_ uiView: UIVisualEffectView, context: UIViewRepresentableContext<Self>) { uiView.effect = effect }
|
||
|
}
|