Skip to content

ImagePicker is a Swift Package to make it easy to pick images from the photo library.

License

Notifications You must be signed in to change notification settings

0xWDG/ImagePicker

Repository files navigation

ImagePicker

ImagePicker is a Swift Package to make it easy to pick images from the photo library.

Swift Package Manager License

Requirements

  • Swift 5.9+ (Xcode 15+)
  • iOS 13+, macOS 10.15+

Installation (Pakage.swift)

dependencies: [
    .package(url: "https://github.com/0xWDG/ImagePicker.git", branch: "main"),
],
targets: [
    .target(name: "MyTarget", dependencies: [
        .product(name: "ImagePicker", package: "ImagePicker"),
    ]),
]

Installation (Xcode)

  1. In Xcode, open your project and navigate to FileSwift PackagesAdd Package Dependency...
  2. Paste the repository URL (https://github.com/0xWDG/ImagePicker) and click Next.
  3. Click Finish.

Usage

import SwiftUI
import ImagePicker

struct ContentView: View {
    @State
    private var image: Image?

    var body: some View {
        VStack {
            ImagePicker(image: $image)
                .frame(width: 150, height: 150)
        }
        .padding()
    }
}

Contact

We can get in touch via Mastodon, Twitter/X, Discord, Email, Website.

Interested learning more about Swift? Check out my blog.

About

ImagePicker is a Swift Package to make it easy to pick images from the photo library.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages