自定义相册浏览器支持iphone、ipad 兼容横竖屏

初衷 由于项目需要但是现在主流的相册浏览器 TZImagePickerController等 不能兼容iPad 以及横竖屏 引子自己封了一个 虽然没有别人写的功能那么晚上。不过千里之行始于足下,希望大家能支持我,有问题请及时反馈,我会尽快处理。

一、使用方式

1、https://github.com/IceTears1/BLImagePickerController.git

下载BLImagePickerLib文件导入项目

2、使用pod 导入

pod 'BLImagePickerLib'

二、使用须知

1、需要在plist文件中加入

2、如果相册名字显示英文则需要加入

3、目前仅兼容iOS 8.0 以上系统

三、使用

1、导入头文件

#import 

2、调用

1> 设置的参数可以参考文档 都有详细注释

2>返回的参数包括图片的处理进度  图片的数组  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、模态跳转 push  、自定义模态 push(目前支持上下左右四个方向进入 预留BLDIYTrasitionAnimation可以自定义转场动画) 跳转  四种任选一种均可。

(转场动画 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];

转载请注明出处:https://my.oschina.net/iceTear/blog/1498504

git地址https://github.com/IceTears1

相册浏览器githttps://github.com/IceTears1/BLImagePickerController

你可能感兴趣的:(自定义相册浏览器支持iphone、ipad 兼容横竖屏)