自定義相冊瀏覽器支持iphone、ipad 兼容橫豎屏

初衷 由于項(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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容