{"id":17203251,"url":"https://github.com/longitachi/zlphotobrowser-objc","last_synced_at":"2025-04-13T21:12:35.486Z","repository":{"id":50739536,"uuid":"291668448","full_name":"longitachi/ZLPhotoBrowser-objc","owner":"longitachi","description":"(ZLPhotoBrowser oc 版本)轻量级照片选择框架，支持预览/相册内拍照及录视频、拖拽/滑动选择，编辑裁剪图片/视频，支持多语言国际化等功能","archived":false,"fork":false,"pushed_at":"2021-07-09T12:23:29.000Z","size":359,"stargazers_count":65,"open_issues_count":0,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T21:12:30.867Z","etag":null,"topics":["carthage-support","cocoapods-support","gif","imagepicker","livephoto","photos","selectimage"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/longitachi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-31T09:12:03.000Z","updated_at":"2025-02-25T15:33:52.000Z","dependencies_parsed_at":"2022-08-23T22:00:40.727Z","dependency_job_id":null,"html_url":"https://github.com/longitachi/ZLPhotoBrowser-objc","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longitachi%2FZLPhotoBrowser-objc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longitachi%2FZLPhotoBrowser-objc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longitachi%2FZLPhotoBrowser-objc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longitachi%2FZLPhotoBrowser-objc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longitachi","download_url":"https://codeload.github.com/longitachi/ZLPhotoBrowser-objc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782259,"owners_count":21160717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage-support","cocoapods-support","gif","imagepicker","livephoto","photos","selectimage"],"created_at":"2024-10-15T02:17:24.610Z","updated_at":"2025-04-13T21:12:35.462Z","avatar_url":"https://github.com/longitachi.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"®![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/ZLPhotoBrowser.png)\n\n[![Version](https://img.shields.io/cocoapods/v/ZLPhotoBrowser-objc.svg?style=flat)](http://cocoadocs.org/docsets/ZLPhotoBrowser-objc)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\u0026nbsp;\n[![License](https://img.shields.io/cocoapods/l/ZLPhotoBrowser-objc.svg?style=flat)](http://cocoadocs.org/docsets/ZLPhotoBrowser-objc)\n[![Platform](https://img.shields.io/cocoapods/p/ZLPhotoBrowser-objc.svg?style=flat)](http://cocoadocs.org/docsets/ZLPhotoBrowser-objc)\n![Language](https://img.shields.io/badge/Language-%20Objective%20C%20-blue.svg)\n\n----------------------------------------\n\n## 说明\n该框架为原[`ZLPhotoBrowser`](https://github.com/longitachi/ZLPhotoBrowser)，`4.0.0`版本以后由`Swift`重新编写，该`OC`版本不在维护，`Swift`版本有更多功能，请使用`Swift`版本\n\n### 运行Demo\n下载完Demo请执行`carthage update --use-xcframeworks --platform iOS` （运行时候请选择 `Example` target）`SDWebImage.framework` 和 `SDWebImageMapKit.framework` 路径如果报错的话，关掉项目，重新打开即可\n\n### 框架整体介绍\n* [功能介绍](#功能介绍)\n* [更新日志](#更新日志)\n* [使用方法(支持cocoapods/carthage安装)](#使用方法)\n* [English Document](#English)\n* [效果图](#效果图)\n\n### \u003ca id=\"功能介绍\"\u003e\u003c/a\u003e功能介绍\n- [x] 支持横竖屏\n- [x] 预览快速选择、可设置预览最大数 (支持拖拽选择)\n- [x] 直接进入相册选择 （支持滑动多选）\n- [x] 编辑图片 (可自定义裁剪比例)\n- [x] 编辑视频\n- [x] 查看、选择gif、LivePhoto(iOS9.0)、video\n- [x] 3D Touch预览image、gif、LivePhoto、video\n- [x] 混合选择image、gif、livePhoto、video\n- [x] 在线下载iCloud照片\n- [x] 控制选择video最大时长\n- [x] 多语言国际化 (中文简/繁、英文、日文，可设置跟随系统和自行切换，可自定义多语言提示)\n- [x] 相册内拍照按钮实时显示镜头捕捉画面\n- [x] 已选择图片遮罩层标记\n- [x] 已选择图片index\n- [x] 预览已选择照片\n- [x] 预览网络及本地 图片/视频 (图片支持长按保存至相册)\n- [x] 相册内图片自定义圆角弧度\n- [x] 自定义升序降序排列\n- [x] 支持点击拍照及长按录制视频 (仿微信)\n- [x] 开发者可自定义资源图片\n- [x] 支持导出视频 (可指定导出视频尺寸、添加图片水印、粒子特效 ps:文字水印暂不支持)\n\n### Feature\n\n\u003e 如果您在使用中有好的需求及建议，或者遇到什么bug，欢迎随时issue，我会及时的回复\n \n### 更新日志\n\u003e [更多更新日志](https://github.com/longitachi/ZLPhotoBrowser-objc/blob/master/UPDATELOG.md)\n```\n● 1.0.4: 修复无法导出iCloud视频的bug;\n● 1.0.1: 适配iOS14 limited权限;\n```\n\n### 框架支持\n最低支持：iOS 8.0 \n\nIDE：Xcode 9.0 及以上版本 (由于适配iPhone X使用iOS11api，所以请使用Xcode 9.0及以上版本)\n\n### \u003ca id=\"使用方法\"\u003e\u003c/a\u003e使用方法\n\n第一步：\n* Manually \n  * 1.直接把PhotoBrowser文件夹拖入到您的工程中\n  * 2.导入 Photos.framework及PhotosUI.framework\n  * 3.项目依赖 `SDWebImage`、`GPUImage` 所以需要导入这两个框架\n  * 4.导入 \"ZLPhotoBrowser.h\"\n* Cocoapods\n  * 1.在Podfile 中添加 `pod 'ZLPhotoBrowser-objc'`\n  * 2.执行 `pod setup`\n  * 3.执行 `pod install` 或 `pod update`\n  * 4.导入 \\\u003cZLPhotoBrowser/ZLPhotoBrowser.h\\\u003e\n* Carthage\n  * 1.在Cartfile 中添加 `github \"longitachi/ZLPhotoBrowser-objc\"`\n  * 2.执行 `carthage update`\n  * 3.导入 \\\u003cZLPhotoBrowser/ZLPhotoBrowser.h\\\u003e\n\n第二步：\n- 在项目plist配置文件中添加如下键值对\n```objc\n//如果不添加该键值对，则不支持多语言，相册名称默认为英文\nLocalized resources can be mixed YES\n//或者右键plist文件Open As-\u003eSource Code 添加\n\u003ckey\u003eCFBundleAllowMixedLocalizations\u003c/key\u003e\n\u003ctrue/\u003e\n\n//相册使用权限描述\nPrivacy - Photo Library Usage Description\n//相机使用权限描述\nPrivacy - Camera Usage Description\n//麦克风使用权限描述\nPrivacy - Microphone Usage Description\n```\n\n代码中调用\n```objc\n#import \u003cZLPhotoBrowser/ZLPhotoBrowser.h\u003e\n    \nZLPhotoActionSheet *ac = [[ZLPhotoActionSheet alloc] init];\n\n// 相册参数配置，configuration有默认值，可直接使用并对其属性进行修改\nac.configuration.maxSelectCount = 5;\nac.configuration.maxPreviewCount = 10;\n\n//如调用的方法无sender参数，则该参数必传\nac.sender = self;\n\n// 选择回调\n[ac setSelectImageBlock:^(NSArray\u003cUIImage *\u003e * _Nonnull images, NSArray\u003cPHAsset *\u003e * _Nonnull assets, BOOL isOriginal) {\n    //your codes\n}];\n\n// 调用相册\n[ac showPreviewAnimated:YES];\n\n// 预览网络图片\n[ac previewPhotos:arrNetImages index:0 hideToolBar:YES complete:^(NSArray * _Nonnull photos) {\n    // your codes\n}];\n\n\n// 直接调用相机\nZLCustomCamera *camera = [[ZLCustomCamera alloc] init];\n\n\ncamera.doneBlock = ^(UIImage *image, NSURL *videoUrl) {\n    // 自己需要在这个地方进行图片或者视频的保存\n};\n\n[self showDetailViewController:camera sender:nil];\n\n```\n\n------------------\n### \u003ca id=\"English\"\u003e\u003c/a\u003eEnglish\n\n#### Functions\n- [x] Multiple orientations support: Portrait, Landscape\n- [x] Adaption with iPhone X\n- [x] Supports quick selection in preview list, can set maximum preview numbers (drag selection supported)\n- [x] Select from album directly (slide to select multiple images is supported)\n- [x] Edit images (image filter, cut-out proportion can be customized)\n- [x] Edit videos\n- [x] View and select gif, LivePhoto(iOS 9.0+), video\n- [x] 3D Touch preview image, gif, LivePhoto, video\n- [x] Select image, gif, LivePhoto, video assembly\n- [x] Download photos from iCloud online\n- [x] Control to select video max play time\n- [x] Internationalization (current supported: Simple Chinese, English, Japanese, Traditional Chinese. Can follow system or changed in code. Can specify the other language)\n- [x] Including camera cell in album, rendering captured image in real time\n- [x] Able to have a mask on selected items\n- [x] Preview selected items\n- [x] Preview images/videos saved locally or online (long press to save image to album is supported)\n- [x] Customize radius of images in album\n- [x] Able to sort ascending items or descending items\n- [x] Click to take photos or long press to record videos is supported (just like WeChat)\n- [x] Can customize resource images\n- [x] Able to Export video (Can specify video size or add an image watermark or particle effects. PS: text watermark is not supported currently)\n\n#### Requirements\niOS 8.0+\nXcode 9.0+\n\n#### Usage\nStep1\n * Manually\n  * 1. Drag PhotoBrowser/ folder into your project\n  * 2. Import Photos.framework and PhotosUI.framework\n  * 3. This repo relays on SDWebImage and GPUImage, so you also need it\n  * 4. Import \"ZLPhotoActionSheet.h\" at where you wanna use it\n\n * Cocoapods\n  * 1. Add `pod 'ZLPhotoBrowser'` to your Podfile\n  * 2. `pod setup`\n  * 3. `pod install` or `pod update`\n  * 4. import `\u003cZLPhotoBrowser/ZLPhotoBrowser.h\u003e`\n* Carthage\n  * 1.Add `github \"longitachi/ZLPhotoBrowser\"` to your Cartfile \n  * 2.Run `carthage update --platform ios` and add the framework to your project.\n  * 3.import `\u003cZLPhotoBrowser/ZLPhotoBrowser.h\u003e`\n\nStep2\n * add description in info.plist\n```objc\nLocalized resources can be mixed YES\nPrivacy - Photo Library Usage Description\nPrivacy - Camera Usage Description\nPrivacy - Microphone Usage Description\n```\n\n### \u003ca id=\"效果图\"\u003e\u003c/a\u003e 效果图\n- 多语言国际化效果图\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/english.png)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/japan.png)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/zh-hans.png)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/zh-hant.png)\n\n- iPhone X\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/iPhoneXPortrait.png)\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/IPhoneXLandscape.png)\n\n- 3DTouch预览效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/forceTouch.gif)\n\n- 导出视频添加粒子特效(雪花效果)\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/snowEffect.gif)\n\n- 编辑视频预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/editVideo.gif)\n\n- 编辑图片预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/edit.gif)\n\n- 自定义相机效果图及介绍\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/customCamera.gif)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/introduce.png)\n\n- 滑动多选预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/slideSelect.gif)\n\n- 拖拽选择预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/dragSelect.gif)\n\n- 混合选择预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/mixSelect.gif)\n\n- 横屏预览图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/landscape.gif)\n\n- 预览网络图片\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/previewNetImage.gif)\n\n- 遮罩层\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/selectmask.gif)\n\n- 预览快速多选效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览图快速选择.gif)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览大图快速选择.gif)\n\n- 直接进入相册选择相片效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/直接进入相册选择相片.gif)\n\n- 预览大图及缩放效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/查看大图支持缩放.gif)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览选择gif.gif)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览选择视频.gif)\n\n- 拍照\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/相册内部拍照.gif)\n\n- 相册内混合选择效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/相册内混合选择.gif)\n\n- 预览已选择照片效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览已选择照片.gif)\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/预览确定选择的照片.gif)\n\n- 原图功能效果图\n\n![image](https://github.com/longitachi/ImageFolder/blob/master/ZLPhotoBrowser-objc/原图功能.gif)\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongitachi%2Fzlphotobrowser-objc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongitachi%2Fzlphotobrowser-objc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongitachi%2Fzlphotobrowser-objc/lists"}