BUKImagePickerController is a view controller that allows the user picking multiple assets from the photo libray or capturing images with a camera. It looks like the system built-in component UIImagePickerController at first glance . However, BUKImagePickerController is more powerful. Run the example project to take a tour.
It's super easy to use BUKImagePickerController. The normal approach is:
- Implement
BUKImagePickerControllerDelegate
methods. - Simply create a
BUKImagePickerController
instance. - Set its delegate and configure it according to you actual needs.
- Show the image picker controller.
BUKImagePickerController *imagePickerController = [[BUKImagePickerController alloc] init];
imagePickerController.mediaType = BUKImagePickerControllerMediaTypeImage;
imagePickerController.sourceType = BUKImagePickerControllerSourceTypeLibrary;
imagePickerController.delegate = self;
imagePickerController.allowsMultipleSelection = YES;
[self presentViewController:imagePickerController animated:YES completion:nil];
In your delegate:
- (void)buk_imagePickerController:(BUKImagePickerController *)imagePickerController didFinishPickingAssets:(NSArray *)assets {
// Process assets
[imagePickerController dismissViewControllerAnimated:YES completion:nil];
}
Run the example project and see the full documentation for more details.
- iOS 7.0 and later
- ARC
BUKImagePickerController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BUKImagePickerController"
Inspired by QBImagePicker
Yiming Tang, @yiming_t
BUKImagePickerController is available under the MIT license. See the LICENSE file for more info.