22 lines
651 B
Swift
22 lines
651 B
Swift
import SwiftUI
|
|
import UIKit
|
|
|
|
struct ActivityView: UIViewControllerRepresentable {
|
|
var activityItems: [Any]
|
|
var applicationActivities: [UIActivity]? = nil
|
|
|
|
func makeUIViewController(context: UIViewControllerRepresentableContext<ActivityView>)
|
|
-> UIActivityViewController {
|
|
let controller = UIActivityViewController(
|
|
activityItems: activityItems,
|
|
applicationActivities: applicationActivities
|
|
)
|
|
return controller
|
|
}
|
|
|
|
func updateUIViewController(
|
|
_ uiViewController: UIActivityViewController,
|
|
context: UIViewControllerRepresentableContext<ActivityView>
|
|
) {}
|
|
}
|