iOS圖片選擇器:JSImagePickerController
JSImagePickerController是一款使用的圖片選擇器。比起其他選擇器多了滾動視圖,能夠快速選擇圖片庫中的圖像。
安裝
Just drop the two files for the JSImagePickerViewController class into your project and import them into whichever view controllers you want:
#import "JSImagePickerViewController.h"
Next, put this code in your project to create and show the image picker:
JSImagePickerViewController *imagePicker = [[JSImagePickerViewController alloc] init]; imagePicker.delegate = self; [imagePicker showImagePickerInController:self animated:YES];
and add this delegate method to your code:
- (void)imagePickerDidSelectImage:(UIImage *)image;
and if you want there are a choice of different delegate methods to choose from:
- (void)imagePickerDidOpen; - (void)imagePickerWillOpen; - (void)imagePickerWillClose; - (void)imagePickerDidClose; - (void)imagePickerDidCancel;
and for personalization you can edit the public property's of the image picker:
@property (nonatomic) NSTimeInterval animationTime; @property (nonatomic, strong) UICollectionView *collectionView; @property (nonatomic, strong) UIButton *photoLibraryBtn; @property (nonatomic, strong) UIButton *cameraBtn; @property (nonatomic, strong) UIButton *cancelBtn;
項目主頁:http://www.baiduhome.net/lib/view/home/1426423933672
本文由用戶 y37f 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!