Giter VIP home page Giter VIP logo

imagepicker's Introduction

⚠️ DEPRECATED, NO LONGER MAINTAINED

ImagePicker

Version Carthage Compatible License Platform Swift Join the chat at https://gitter.im/hyperoslo/ImagePicker

Description

ImagePicker Icon

ImagePicker is an all-in-one camera solution for your iOS app. It lets 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
present(imagePickerController, animated: true, completion: nil)

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

func wrapperDidPress(_ imagePicker: ImagePickerController, images: [UIImage])
func doneButtonDidPress(_ imagePicker: ImagePickerController, images: [UIImage])
func cancelButtonDidPress(_ imagePicker: ImagePickerController)

ImagePicker supports limiting the amount of images that can be selected, it defaults to zero, which means that the user can select as many images as he/she wants.

let imagePickerController = ImagePickerController()
imagePickerController.imageLimit = 5

Optional bonus

Configuration

You can inject Configuration instance to ImagePicker, which allows you to configure text, colors, fonts and camera features

var configuration = Configuration()
configuration.doneButtonTitle = "Finish"
configuration.noImagesTitle = "Sorry! There are no images here!"
configuration.recordLocation = false

let imagePicker = ImagePickerController(configuration: configuration)
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 AssetManager.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'

ImagePicker is also available through Carthage. To install just write into your Cartfile:

github "hyperoslo/ImagePicker"

Author

Hyper made this with ❤️

Contribute

We would love you to contribute to ImagePicker, check the CONTRIBUTING file for more info.

License

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

imagepicker's People

Contributors

aashishdhawan avatar aliasbody avatar autumnssun avatar benchr267 avatar boraseoksoon avatar cemaleker avatar fnakstad avatar gitter-badger avatar haitec avatar hansemannn avatar ismyhc avatar jadar avatar jarmourato avatar juliensaad avatar kernjackson avatar ksinghal avatar leojkwan avatar onato avatar onmyway133 avatar rafalmq avatar ramongilabert avatar richardtop avatar spencerwhyte avatar ulukaya avatar vadymmarkov avatar vrujbr avatar weakfl avatar weslindsay avatar zenangst avatar zsteed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.