Coder Social home page Coder Social logo

jpsimagepickercontroller's Introduction

JPSImagePickerController

A pixel-perfect clone of iOS 7's UIImagePickerController, with a few improvements. I built this because Apple's image picker is difficult to modify. Works on both iPad & iPhone.

Screenshots

Features:

  • Front/Back camera switching
  • Flash on/off
  • Taking pictures in multiple orientations
  • Triggering a picture with the "volume up" hardware button
  • Confirmation screen
  • Zooming the image in the confirmation screen
  • Displaying a message in the confirmation screen

Installation

From CocoaPods

Add pod 'JPSImagePickerController' to your Podfile.

Manually

Drag the JPSImagePickerController folder into your project and link the MediaPlayer and AVFoundation frameworks to your project.

Usage

Just launch it modally and set its delegate:

JPSImagePickerController *imagePicker = [[JPSImagePickerController alloc] init];
imagePicker.delegate = self;
[self presentViewController:imagePicker animated:YES completion:nil];

Its delegate can respond to the following methods:

// Called immediately after the picture was taken
- (void)picker:(JPSImagePickerController *)picker didTakePicture:(UIImage *)picture;
// Called immediately after the "Use" button was tapped
- (void)picker:(JPSImagePickerController *)picker didConfirmPicture:(UIImage *)picture;
// Called immediately after the "Cancel" button was tapped
- (void)pickerDidCancel:(JPSImagePickerController *)picker;

See sample Xcode project for more examples on how to configure.

TODO

  • Display a box around the tapped area when tapping to focus.
  • Per-element rotation of "flash", "camera switch" and "Cancel" buttons. This is tricky because we don't want our whole layout to change, just those buttons.
  • Better camera switching animation. It's currently a bit janky.
  • Full reproduction of UIImagePickerController's flash control. i.e. expanding to see "Auto", "On" & "Off"

License

This project is under the MIT license.

jpsimagepickercontroller's People

Contributors

jpsim avatar jregnauld avatar qianyanseu avatar sotoighost avatar wiruzx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpsimagepickercontroller's Issues

Image Orientation Issue

Current version of this image picker uses device orientation as image orientation.

This is fine when the app has both portrait and landscape layouts. But for portrait-only apps, this causes confusion when taking images. No matter what orientation the device is, the result orientation of the result image is always default value.

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.