CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Jun 2016 |
| SPMSupports SPM | ✗ |
Maintained by Asif Bilal.
This is the simple photo picker which uses default iPhone SDK with UIImagePickerController. SimplePhotoPicker is a control that optionally takes inputs of Source Type & allow Editing. On the basis of these inputs, this control displays the action sheet if needed and displays the iOS default image editor if selected. It has simple block based implementation. No need to implement delegate methods.
SimplePhotoPicker to your Podfilesource 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'SimplePhotoPicker', '~> 0.1'pod install.Alternatively, you can directly add file PhotoPicker.swift under the folder PhotoPicker to your project.
PhotoPicker.swift directory onto your project. Make sure to select Copy items when asked if you extracted the code archive outside of your project.Create instance variable of PhotoPicker in your view controller.
private lazy var photoPicker = PhotoPicker()
And then call the pick function with options.
photoPicker.pick(allowsEditing, pickerSourceType: pickerSourceType, controller: self) { (originalPhoto, editedPhoto) in
if self.allowsEditing { self.imageView.image = editedPhoto}
else { self.imageView.image = originalPhoto}
}
See example projects for detail.
This code is distributed under the terms and conditions of the MIT license.