Giter VIP home page Giter VIP logo

qbimagepickercontroller's Introduction

QBImagePickerController

A clone of UIImagePickerController with multiple selection support.

Installation

QBImagePickerController is available in CocoaPods.

pod 'QBImagePickerController'

If you want to install manually, download this repository and copy files in QBImagePickerController directory to your project, and link AssetsLibrary.framework.

Example

Check If Source is Accessible

if (![QBImagePickerController isAccessible]) {
    NSLog(@"Error: Source is not accessible.");
}

Single Image Picker

QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;

Multiple Image Picker

QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsMultipleSelection = YES;

Multiple Image Picker with Limitation

QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.allowsMultipleSelection = YES;
imagePickerController.minimumNumberOfSelection = 3;
imagePickerController.maximumNumberOfSelection = 6;

Specify the Albums to Show

QBImagePickerController *imagePickerController = [[QBImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.groupTypes = @[
                                     @(ALAssetsGroupSavedPhotos),
                                     @(ALAssetsGroupPhotoStream),
                                     @(ALAssetsGroupAlbum)
                                     ];

The order of albums will be the same as specified in groupTypes array.

Show Image Picker

QBImagePickerController is not a subclass of UINavigationController.
If you want to show the picker as a modal view, you have to set the picker to topViewController property of an instance of UINavigationController.
If you want to push the picker to UINavigtionController, you don't have to do anything.

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:imagePickerController];
[self presentViewController:navigationController animated:YES completion:NULL];

License

QBImagePickerController is released under the MIT License, see LICENSE.txt.

qbimagepickercontroller's People

Contributors

anasb avatar kelp404 avatar mnloop avatar nek023 avatar satoship avatar siuying avatar yimingtang avatar

Watchers

 avatar  avatar  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.