swiftui-photos-picker

2.0.0

lorenzofiamingo/swiftui-photos-picker

What's New

SwiftUI PhotosPicker 2.0.0

2022-02-25T20:21:29Z

SwiftUI PhotosPicker πŸŒ‡

PhotosPicker is a photos picker sheet, based on PHPickerViewController. Currently supports only iOS and Mac Catalyst.

Usage

PhotosPicker has similar API and behavior as other Presentation Modifiers.

import SwiftUI
import PhotosPicker

struct ContentView: View {
    
    @State private var showingPicker = false
    
    var body: some View {
        Button("Choose image") {
            showingPicker = true
        }
        .photosPicker(isPresented: $showingPicker) { photos in
            if photos.count > 0 {
                print("Selected \(photos)")
            }
        }
    }
}

Installation

  1. In Xcode, open your project and navigate to File β†’ Swift Packages β†’ Add Package Dependency...
  2. Paste the repository URL (https://github.com/lorenzofiamingo/SwiftUI-PhotosPicker) and click Next.
  3. Click Finish.

Other projects

SwiftUI MapItemPicker πŸ—ΊοΈ

SwiftUI CachedAsyncImage πŸ—ƒοΈ

SwiftUI VerticalTabView πŸ”

SwiftUI SharedObject 🍱

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Jan 23 2023 21:35:40 GMT-0500 (GMT-05:00)