diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-04-01 21:05:53 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-04-01 21:05:53 -0600 |
commit | 48f661382a6c57e00bcd1908ce497116c557c2de (patch) | |
tree | 61bc3966f52f03ecc23bd99092d289c33560d249 /iosApp/iosApp/Shared/ShareViewController.swift | |
parent | 20068c7e0d20740506ca268b34c2e520385af385 (diff) | |
parent | d95742dd9f80506a0d773cbba7bc6a4508de1964 (diff) | |
download | etbsa-trackermap-mobile-48f661382a6c57e00bcd1908ce497116c557c2de.tar.gz etbsa-trackermap-mobile-48f661382a6c57e00bcd1908ce497116c557c2de.tar.bz2 etbsa-trackermap-mobile-48f661382a6c57e00bcd1908ce497116c557c2de.zip |
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'iosApp/iosApp/Shared/ShareViewController.swift')
-rw-r--r-- | iosApp/iosApp/Shared/ShareViewController.swift | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/iosApp/iosApp/Shared/ShareViewController.swift b/iosApp/iosApp/Shared/ShareViewController.swift new file mode 100644 index 0000000..ed26ab8 --- /dev/null +++ b/iosApp/iosApp/Shared/ShareViewController.swift @@ -0,0 +1,26 @@ +// +// ShareViewController.swift +// iosApp +// +// Created by Iván on 31/03/22. +// Copyright © 2022 orgName. All rights reserved. +// + +import Foundation +import SwiftUI +import UIKit + +struct ShareView: UIViewControllerRepresentable { + + @Binding var activityItems: [Any] + var excludedActivityTypes: [UIActivity.ActivityType]? = nil + + func makeUIViewController(context: UIViewControllerRepresentableContext<ShareView>) -> UIActivityViewController { + let controller = UIActivityViewController(activityItems: activityItems, + applicationActivities: nil) + controller.excludedActivityTypes = excludedActivityTypes + return controller + } + + func updateUIViewController(_ uiViewController: UIActivityViewController, context: UIViewControllerRepresentableContext<ShareView>) {} +} |