Impressia/Vernissage/Views/ActivityView.swift

21 lines
637 B
Swift
Raw Normal View History

2023-04-16 09:28:29 +02:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
// Licensed under the Apache License 2.0.
//
import Foundation
import UIKit
import SwiftUI
2023-10-19 13:24:02 +02:00
@MainActor
2023-04-16 09:28:29 +02:00
struct ActivityView: UIViewControllerRepresentable {
let image: UIImage
func makeUIViewController(context _: UIViewControllerRepresentableContext<ActivityView>) -> UIActivityViewController {
return UIActivityViewController(activityItems: [image], applicationActivities: nil)
}
func updateUIViewController(_: UIActivityViewController, context _: UIViewControllerRepresentableContext<ActivityView>) {}
}