iOS相册选择器-单选/多选/拍照/iphone/ipad/兼容横竖屏

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

一、使用方式

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

下载BLImagePickerLib文件导入项目

2、 使用pod 导入

pod 'BLImagePickerLib'  

二、使用须知

1、需要在plist文件中加入(xcode8 之后需要获取权限)

101338_Axti_2523541.png

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

101444_fcua_2523541.png

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

三、使用

1、导入头文件

#import <BLImagePickerViewController.h>

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<UIImage *> *resultAry, NSArray<PHAsset *> *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

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

转载于:https://my.oschina.net/iceTear/blog/1498504

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值