Swiftpack.co - Package - shaps80/ActivityView

ios tv watch mac

ActivityView

A SwiftUI view for presenting a UIActivityViewController correctly across all platforms.

Example

struct ShareView: View {
    @State private var isPresented = false

    var body: some View {
        return Button("Share") { isPresented = true }
            .activity(
                isPresented: $isPresented,
                items: ["text"]
            )
    }
}

Features

  • Familiar API – Similar to alert, sheet, etc...
  • Supports all platforms
  • Nested activity controllers
  • Popover on iPad, modal everywhere else

Installation

The library is provided as an open-source Swift package. So simply add the dependency to your package list:

https://github.com/shaps80/ActivityView.git

Github

link
Stars: 2

Dependencies

Used By

Total: 0