Latest 0.0.1
Homepage https://github.com/ulian-onua/KRImagePickerController
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

KRImagePickerController is written in Swift wrapper under UIImagePickerController to simplify its usage.

Installation

CocoaPods

Just add pod 'KRImagePickerController' to your Podfile and run pod install in Terminal from your project folder.

Write import KRImagePickerController in appropriate instance of UIViewController from which UIImagePickerController should be presented.

How to use

To pick image from camera/photo library just call one of next methods from instance of UIViewController:


func pickFromPhotoLibrary(completion : @escaping ImageCompletion)
func pickFromCamera(completion : @escaping ImageCompletion)
func pickFromSavedPhotosAlbum(completion : @escaping ImageCompletion)

func pick(sourceType : UIImagePickerControllerSourceType, completion : @escaping ImageCompletion) //сhoose source manually

Example:

//call this method in method of UIViewControler instance
pickFromSavedPhotosAlbum { [unowned self] (image, error) in
    if error != nil {
        //handle error
    } else {
        self.imageView.image = image
    }
}

Requirements

  • iOS 8.0 and above
  • XCode 7+

License

KRImagePickerController is released under the MIT license. See LICENSE for details.

Contact

Any suggestion or question? Please create a Github issue or reach me out.

LinkedIn

Latest podspec

{
    "name": "KRImagePickerController",
    "version": "0.0.1",
    "summary": "KRImagePickerController is written is Swift a wrapper above UIImagePickerController to simplify its usage",
    "homepage": "https://github.com/ulian-onua/KRImagePickerController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Julian Drapaylo": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ulian-onua/KRImagePickerController.git",
        "tag": "0.0.1"
    },
    "source_files": "Source/*.{swift}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This