Giter VIP home page Giter VIP logo

imagepicker's Introduction

ImagePicker

A highly encapsulated and fully functional open-source image picker written in Objc based on Photokit. Including album list, asset list, selection preview, camera and short video taking.

Please use it in non-commercial ways, thx.

Module Introductions

Overview

This Image Picker is developed and re-encapsulated based on QBImagePicker, MWPhotoBrowser, VIMVideoPlayer, LLSimpleCamera and the Photokit Sample Code by WWDC. You can find these librarys on Github. I did some customized modification to them in order to avoid some conflicts with your existing project. You can safely import VIMVideoPlayer and LLSimpleCamera if you already have them in your project. QBImagePicker and MWPhotoBrowser have been totally modified and minimized into some parts of this whole project.

Unauthorized situations have alse been considered already. When your app doesn't have the access to Photo or Camera or MicroPhone, an unauthorized view will appear and guide user to the system setting of the app's privacy. You can customize this view yourself.

To import this library into your project, you should follow these steps:

  1. Make sure your project has already imported VIMVideoPlayer and LLSimpleCamera, the source code of these two librarys are in this project. You can also search them on Github and import them using CocoaPod of Carthage.
  2. Drag and remember to copy every useful files with the prefix RT- into your project.
  3. If there is still some troubles, just bring me with an issue.
  4. The usage is truly simple:
RTImagePickerViewController *imagePickerController = [RTImagePickerViewController new];
imagePickerController.delegate = self;
imagePickerController.mediaType = RTImagePickerMediaTypeImage;
imagePickerController.allowsMultipleSelection = YES;
imagePickerController.showsNumberOfSelectedAssets = YES;
imagePickerController.maximumNumberOfSelection = 9;

[self presentViewController:imagePickerController animated:YES completion:^{
}];

you should comform your controller to RTImagePickerViewControllerDelegate and implement these protocols, remember you should choose whether to dismiss or not yourself:

- (void)rt_imagePickerController:(RTImagePickerViewController *)imagePickerController didFinishPickingAssets:(NSArray *)assets;
- (void)rt_imagePickerController:(RTImagePickerViewController *)imagePickerController didFinishPickingImages:(NSArray<UIImage *> *)images;
- (void)rt_imagePickerController:(RTImagePickerViewController *)imagePickerController didFinishPickingVideoWithFileName:(NSString *)fileName withCaptureImage:(UIImage *)image;
- (void)rt_imagePickerControllerDidCancel:(RTImagePickerViewController *)imagePickerController;

AssetsList

image

AlbumsList

image

SelectionPreview

image image

Camera

image

ShortVideo-Taking

image image

imagepicker's People

Contributors

sergiochan avatar

Watchers

James Cloos avatar Bruce 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.