初衷 由于項(xiàng)目需要但是現(xiàn)在主流的相冊瀏覽器 TZImagePickerController等 不能兼容iPad 以及橫豎屏 引子自己封了一個(gè) 雖然沒有別人寫的功能那么晚上。不過千里之行始于足下,希望大家能支持我,有問題請及時(shí)反饋,我會(huì)盡快處理。
一、使用方式
1、https://github.com/IceTears1/BLImagePickerController.git
下載BLImagePickerLib文件導(dǎo)入項(xiàng)目
2、使用pod 導(dǎo)入
pod 'BLImagePickerLib'
二、使用須知
1、需要在plist文件中加入

2、如果相冊名字顯示英文則需要加入

3、目前僅兼容iOS 8.0 以上系統(tǒng)
三、使用
1、導(dǎo)入頭文件
#import? <BLImagePickerViewController.h>
2、調(diào)用
1> 設(shè)置的參數(shù)可以參考文檔 都有詳細(xì)注釋
2>返回的參數(shù)包括圖片的處理進(jìn)度? 圖片的數(shù)組? PHAsset對象方便自己做特殊處理
如果開啟了編輯功能則返回的圖片放在editedImage 對象里邊
BLImagePickerViewController *vc = [[BLImagePickerViewController alloc]init];
vc.maxNum = 5;
vc.imageClipping = YES;
vc.showCamera = YES;
[vc initDataProgress:^(CGFloat progress) {
} finished:^(NSArray *resultAry, NSArray *assetsArry, UIImage *editedImage) {
} cancle:^(NSString *cancleStr) {
}];
3、模態(tài)跳轉(zhuǎn) push? 、自定義模態(tài) push(目前支持上下左右四個(gè)方向進(jìn)入 預(yù)留BLDIYTrasitionAnimation可以自定義轉(zhuǎn)場動(dòng)畫) 跳轉(zhuǎn)? 四種任選一種均可。
(轉(zhuǎn)場動(dòng)畫 git:https://github.com/IceTears1/BLTransitionAnimator ?? )
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
[self.navigationController pushViewController:vc animated:YES];
[self BL_presentViewController:nav AnimatorStyle:BLTransitionAnimatorTop animated:YES];
[self.navigationController BL_pushViewController:vc AnimatorStyle:BLTransitionAnimatorBottom animated:YES];
轉(zhuǎn)載請注明出處:https://my.oschina.net/iceTear/blog/1498504
git地址https://github.com/IceTears1
相冊瀏覽器githttps://github.com/IceTears1/BLImagePickerController