Swiftpack.co - Siwon-L/SFImagePicker as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Siwon-L.
Siwon-L/SFImagePicker 0.3.1
사진 다중 선택이 가능한 ImagePicker 입니다.
⭐️ 0
🕓 32 weeks ago
iOS
.package(url: "https://github.com/Siwon-L/SFImagePicker.git", from: "0.3.1")

SFImagePicker

CI Status Version License Platform SwiftPM

Usage

Info.plist

To be able to request permission to the users photo library you need to add this to your Info.plist

<key>NSPhotoLibraryUsageDescription</key>
<string>Why you want to access photo library</string>
Image picker
import SFImagePicker

let imagePicker = SFImagePicker()

presentImagePicker(imagePicker, animated: true) { (imageManager) in
  // User selected an asset. Do something with it. Perhaps begin processing/upload?
} onDeSelction: { (imageManager) in
  // User deselected an asset. Cancel whatever you did when asset was selected.
} onFinish: { (imageManagers) in
  // User finished selection images.
} onCancel: { (imageManagers) in
  // User canceled selection.
}
SFImageManager

You need to get the image through acquired imageManager.

let imageView = UIImageView()
let size = CGSize(width: 30, height: 30)
imageManager.request(size: size) { image, _ in
  imageView.imageID = imageManager.assetID
  imageView.image = image!
}
Settings

Users can set the selector to their liking.

picker.settings.selection.max = 3 // maximum number of select
picker.settings.selection.min = 2 // minimum number of select
picker.settings.ui.selectedIndicatorColor = .green // indicator color
picker.settings.ui.selectedIndicatorTextColor = .black // indicator text color
picker.settings.fetchOptions.isSynchronous = false // Synchronous & Asynchronous
picker.settings.fetchOptions.deliveryMode = .fastFormat // delivery mode

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SFImagePicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SFImagePicker'

Author

saafaaari, [email protected]

License

SFImagePicker is available under the MIT license. See the LICENSE file for more info.

Simulator

Main Detail

GitHub

link
Stars: 0
Last commit: 32 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics