# TZImagePickerController
[![CocoaPods](https://img.shields.io/cocoapods/v/TZImagePickerController.svg?style=flat)](https://github.com/banchichen/TZImagePickerController)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+.
一个支持多选、选原图和视频的图片选择器,同时有预览功能,支持iOS6+。
## 重要提示1:提issue前,请先对照Demo、常见问题自查!Demo正常说明你可以升级下新版试试。
## 重要提示2:3.7.5版本修复了iOS15.2下初次授权相册权限时的长时间卡顿&白屏问题,强烈建议尽快更新
关于iOS14模拟器的问题
PHAuthorizationStatusLimited授权模式下,iOS14模拟器有bug,未授权照片无法显示,真机正常,暂可忽略:https://github.com/banchichen/TZImagePickerController/issues/1347
关于升级iOS10和Xcdoe8的提示:
在Xcode8环境下将项目运行在iOS10的设备/模拟器中,访问相册和相机需要额外配置info.plist文件。分别是Privacy - Photo Library Usage Description和Privacy - Camera Usage Description字段,详见Demo中info.plist中的设置。
项目截图 1.Demo首页 2.照片列表页 3.照片预览页 4.视频预览页
<img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/DemoPage.png" width="40%" height="40%"><img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/photoPickerVc.PNG" width="40%" height="40%">
<img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/photoPreviewVc.PNG" width="40%" height="40%"><img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/videoPlayerVc.PNG" width="40%" height="40%">
## 一. Installation 安装
#### CocoaPods
> pod 'TZImagePickerController' # Full version with all features
> pod 'TZImagePickerController/Basic' # No location code
#### Carthage
> github "banchichen/TZImagePickerController"
#### 手动安装
> 将TZImagePickerController文件夹拽入项目中,导入头文件:#import "TZImagePickerController.h"
## 二. Example 例子
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:9 delegate:self];
// You can get the photos by block, the same as by delegate.
// 你可以通过block或者代理,来得到用户选择的照片.
[imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
}];
[self presentViewController:imagePickerVc animated:YES completion:nil];
## 三. Requirements 要求
iOS 6 or later. Requires ARC
iOS6及以上系统可使用. ARC环境.
When system version is iOS6 or iOS7, Using AssetsLibrary.
When system version is iOS8 or later, Using PhotoKit.
如果运行在iOS6或7系统上,用的是AssetsLibrary库获取照片资源。
如果运行在iOS8及以上系统上,用的是PhotoKit库获取照片资源。
TZImagePickerController uses Camera、Location、Microphone、Photo Library,you need add these properties to info.plist like Demo:
TZImagePickerController使用了相机、定位、麦克风、相册,请参考Demo添加下列属性到info.plist文件:
`Privacy - Camera Usage Description`
`Privacy - Location Usage Description`
`Privacy - Location When In Use Usage Description`
`Privacy - Microphone Usage Description`
`Privacy - Photo Library Usage Description`
`Prevent limited photos access alert`
## 四. More 更多
If you find a bug, please create a issue.
More information please view code.
如果你发现了bug,请提一个issue。
更多信息详见代码,也可查看我的博客: [我的博客](http://www.jianshu.com/p/1975411a31bb "半尺尘 - 简书")
关于issue:
请尽可能详细地描述**系统版本**、**手机型号**、**库的版本**、**崩溃日志**和**复现步骤**,**请先更新到最新版再测试一下**,如果新版还存在再提~如果已有开启的类似issue,请直接在该issue下评论说出你的问题
## 五. FAQ 常见问题
**Q:pod search TZImagePickerController 搜索出来的不是最新版本**
A:需要在终端执行cd转换文件路径命令退回到Desktop,然后执行pod setup命令更新本地spec缓存(可能需要几分钟),然后再搜索就可以了
**Q:拍照后照片保存失败**
A:请参考issue481:https://github.com/banchichen/TZImagePickerController/issues/481 的信息排查,若还有问题请直接在issue内评论
**Q:photos数组图片不是原图,如何获取原图?**
A:请参考issue457的解释:https://github.com/banchichen/TZImagePickerController/issues/457
**Q:系统语言是中文/英文,界面上却有部分相册名字、返回按钮显示成了英文/中文?**
A:请参考 https://github.com/banchichen/TZImagePickerController/issues/443 和 https://github.com/banchichen/TZImagePickerController/issues/929
**Q:预览界面能否支持传入NSURL、UIImage对象?**
A:3.0.1版本已支持,需新接一个库:[TZImagePreviewController](https://github.com/banchichen/TZImagePreviewController),请参考里面的Demo使用。
**Q:设置可选视频的最大/最小时长?照片的最小/最大尺寸?不符合要求的不显示**
A:可以的,参照Demo的isAssetCanBeDisplayed方法实现。我会返回asset出来,显示与否你来决定,注意这个是一个同步方法,对于需要根据asset去异步获取的信息如视频的大小、视频是否存在iCloud里来过滤的,无法做到。如果真要这样做,相册打开速度会变慢,你需要改我源码。
如果需要显示,选择时才提醒用户不可选,则实现isAssetCanBeSelected,用户选择时会调用它
**Q:预览页面出现了导航栏?**
A:https://github.com/banchichen/TZImagePickerController/issues/652
**Q:可否增加微信编辑图片的功能?**
A:考虑下,优先级低
**Q:是否有QQ/微信群/钉钉群?**
A:有「钉钉群:33192786」和「QQ群:859033147」,推荐加钉钉群,答疑响应更快
**Q:想提交一个Pull Request?**
A:请先加钉钉群(33192786)说下方案,和我确认下,避免同时改动同一处内容。**一个PR请只修复1个问题,变动内容越少越好**。
**Q:demo在真机上跑不起来?**
A:1、team选你自己的;2、bundleId也改成你自己的或改成一个不会和别人重复的。可参考[简书的这篇博客](https://www.jianshu.com/p/cbe59138fca6)
**Q:3.6.4以上版本设置导航栏颜色无效?**
A:参考Demo里的代码,加上imagePickerVc.navigationBar.standardAppearance的相关设置
**Q:设置导航栏颜色无效?导航栏颜色总是白色?**
A:是否有集成WRNavigationBar?如有,参考其readme调一下它的wr_setBlackList,把TZImagePickerController相关的控制器放到黑名单里,使得不受WRNavigationBar的影响。如果没有集成,可在issues列表里搜一下看看类似的issue参考下,如实在没头绪,可加群提供个能复现该问题的demo,0~2天给你解决。最近发现WRNavigationBar的黑名单会有不生效的情况,临时解决方案大家可参考:[https://github.com/wangrui460/WRNavigationBa
没有合适的资源?快使用搜索试试~ 我知道了~
个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+
共127个文件
m:28个
png:28个
h:25个
需积分: 5 0 下载量 99 浏览量
2024-05-16
10:45:25
上传
评论
收藏 875KB ZIP 举报
温馨提示
一个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+。
资源推荐
资源详情
资源评论
收起资源包目录
个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+ (127个子文件)
.DS_Store 6KB
.gitignore 505B
TZImagePickerController.h 26KB
TZImageManager.h 10KB
FLAnimatedImage.h 4KB
TZPhotoPreviewCell.h 2KB
TZAssetCell.h 2KB
LxGridViewFlowLayout.h 2KB
TZAssetModel.h 2KB
FLAnimatedImageView.h 2KB
TZImageCropManager.h 1KB
TZVideoCropController.h 1KB
UIView+TZLayout.h 1KB
TZPhotoPreviewController.h 1KB
TZImageRequestOperation.h 1KB
TZLocationManager.h 859B
TZTestCell.h 545B
TZPhotoPickerController.h 473B
NSBundle+TZImagePicker.h 398B
TZVideoEditedPreviewController.h 349B
TZGifPhotoPreviewController.h 325B
TZVideoPlayerController.h 314B
TZImageUploadOperation.h 305B
AppDelegate.h 288B
TZProgressView.h 263B
TZAuthLimitedFooterTipView.h 233B
ViewController.h 226B
Contents.json 848B
Contents.json 319B
Contents.json 318B
Contents.json 312B
Contents.json 311B
Contents.json 304B
Contents.json 63B
LICENSE 1KB
TZPhotoPickerController.m 61KB
TZImageManager.m 51KB
TZImagePickerController.m 43KB
ViewController.m 43KB
FLAnimatedImage.m 41KB
TZPhotoPreviewController.m 33KB
TZVideoCropController.m 27KB
TZPhotoPreviewCell.m 22KB
TZAssetCell.m 20KB
LxGridViewFlowLayout.m 16KB
TZVideoPlayerController.m 14KB
FLAnimatedImageView.m 14KB
TZImageCropManager.m 8KB
TZGifPhotoPreviewController.m 6KB
TZVideoEditedPreviewController.m 5KB
TZTestCell.m 3KB
UIView+TZLayout.m 3KB
AppDelegate.m 3KB
TZLocationManager.m 3KB
TZAuthLimitedFooterTipView.m 3KB
TZImageUploadOperation.m 3KB
TZImageRequestOperation.m 2KB
TZAssetModel.m 2KB
TZProgressView.m 2KB
TZImagePickerControllerUITests.m 1KB
NSBundle+TZImagePicker.m 1010B
TZImagePickerControllerTests.m 958B
main.m 345B
README.md 13KB
--bug.md 586B
----.md 415B
-------.md 325B
project.pbxproj 62KB
Info.plist 2KB
Info.plist 791B
Info.plist 733B
Info.plist 733B
IDEWorkspaceChecks.plist 238B
photoPickerVc.PNG 326KB
photoPreviewVc.PNG 156KB
videoPlayerVc.PNG 107KB
DemoPage.png 51KB
iCloudError@2x.png 4KB
MMVideoPreviewPlay@2x.png 4KB
MMVideoPreviewPlayHL@2x.png 4KB
takePicture@2x.png 3KB
back@2x.png 2KB
photo_original_def@2x.png 2KB
takePicture80@2x.png 1KB
right_arrow@2x.png 1KB
photo_sel_previewVc@2x.png 1KB
photo_def_photoPickerVc@2x.png 1KB
photo_def_previewVc@2x.png 1KB
photo_sel_photoPickerVc@2x.png 1006B
tip@2x.png 671B
addMore@2x.png 643B
photo_original_sel@2x.png 620B
photo_number_icon@2x.png 501B
preview_number_icon@2x.png 501B
preview_original_def@2x.png 392B
photo_delete@2x.png 347B
VideoSendIcon@2x.png 223B
AlbumAddBtn@2x.png 136B
hx_videoedit_right@2x.png 122B
hx_videoedit_left@2x.png 122B
共 127 条
- 1
- 2
资源评论
UnknownToKnown
- 粉丝: 1w+
- 资源: 627
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功