Skip to content

Reinventing the way ImagePicker works.

License

Notifications You must be signed in to change notification settings

wuzer/ImagePicker

Repository files navigation

ImagePicker

Version License Platform

Description

ImagePicker Icon

**ImagePicker** is an all-in-one camera solution for your iOS app. It let's your users select images from the library and take pictures at the same time. As a developer you get notified of all the user interactions and get the beautiful UI for free, out of the box, it's just that simple.

ImagePicker has been optimized to give a great user experience, it passes around referenced images instead of the image itself which makes it less memory consuming. This is what makes it smooth as butter.

Usage

ImagePicker works as a normal controller, just instantiate it and present it.

let imagePickerController = ImagePickerController()
imagePickerController.delegate = self
presentViewController(imagePickerController, animated: true, completion: nil)

ImagePicker has three delegate methods that will inform you what the users are up to:

func wrapperDidPress(images: [UIImage])
func doneButtonDidPress(images: [UIImage])
func cancelButtonDidPress()

Optional bonus

Configuration

Configure text, colors and fonts by just overriding the static variables in the ImagePicker configuration struct. As an example:

Configuration.doneButtonTitle = "Finish"
Configuration.noImagesTitle = "Sorry! There are no images here!"
Resolve assets

As said before, ImagePicker works with referenced images, that is really powerful because it lets you download the asset and choose the size you want. If you want to change the default implementation, just add a variable in your controller.

public var imageAssets: [UIImage] {
  return ImagePicker.resolveAssets(imagePicker.stack.assets)
}

And when you call any delegate method that returns images, add in the first line:

let images = imageAssets

Installation

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

pod 'ImagePicker'

Author

Hyper Interaktiv AS, [email protected]

License

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

About

Reinventing the way ImagePicker works.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 98.2%
  • Ruby 1.6%
  • Objective-C 0.2%