johnil / JFImagePickerController

高性能多选图片库
MIT License
588 stars 77 forks source link

JFImagePicker

高性能多选图片库

功能

多选照片

预览已选照片

针对超大图片优化

Podfile

platform :ios, '7.0'
pod 'JFImagePicker'

How to Use

Import
#import "JFImagePickerController.h"

@interface ViewController () <JFImagePickerDelegate>

@end
Load JFImagePicker
JFImagePickerController *picker = [[JFImagePickerController alloc] initWithRootViewController:nil];
picker.pickerDelegate = self;
[self presentViewController:picker animated:YES completion:nil];
Delegate Method
- (void)imagePickerDidFinished:(JFImagePickerController *)picker{ 
    //picker.assets is all choices photo
    [picker dismissViewControllerAnimated:YES completion:nil];
}

- (void)imagePickerDidCancel:(JFImagePickerController *)picker{
    [picker dismissViewControllerAnimated:YES completion:nil];
}
Load Thumb UIImage
[[JFImageManager sharedManager] thumbWithAsset:asset resultHandler:^(UIImage *result) {
    //do something
}];
Load UIImage for best size
[[JFImageManager sharedManager] imageWithAsset:asset resultHandler:^(UIImage *result) {
    //do something
}];
clear
[JFImagePickerController clear];  //clear datas

License

JFImagePicker is released under the MIT license. See LICENSE for details.