iOS   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了iOS相册选择器-单选/多选/拍照/iphone/ipad/兼容横竖屏大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

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

一、使用方式

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

下载BLImagePickerLib文件导入项目

2、 使用pod 导入

pod 'BLImagePickerLib'  

二、使用须知

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

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

2、如果相册名字@L_674_7@英文则需要加入

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

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

三、使用

1、导入头文件

#import <BLImagePickerViewController.h>

2、调用

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

2>返回的参数包括图片的处理进度  图片的数组  PHAsset对象@R_874_9968@做特殊处理 

如果开启了编辑功能则返回的图片放在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];

转载请注明出处:http://www.voidcn.com/article/p-bngohazm-bop.html

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

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

@H_944_86@

大佬总结

以上是大佬教程为你收集整理的iOS相册选择器-单选/多选/拍照/iphone/ipad/兼容横竖屏全部内容,希望文章能够帮你解决iOS相册选择器-单选/多选/拍照/iphone/ipad/兼容横竖屏所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。