longitachi / ZLPhotoBrowser

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
MIT License
4.71k stars 950 forks source link
editimage editvideo gallery gif imagepicker ios livephoto photolibrary photos picker swift

Version Carthage compatible SPM supported License Platform Language Usage

image


English | 简体中文

ZLPhotoBrowser is a Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video.

Directory

Detailed usage of Swift and OC, please refer to Wiki.

If you only want to use the image edit feature, please move to ZLImageEditor.

Features

If you have good needs and suggestions in use, or encounter any bugs, please create an issue and I will reply in time.

Requirements

Usage

Change Log

More logs

● 4.5.4
Add:
Support iOS18.
Enhance the user experience of the image cropping interface and optimize the animation effects.
Support for setting `VideoMirrored` in the custom camera.
Fix:
Fix the issue where some UI elements are displayed incorrectly on phones without a notch.
● 4.5.3
Add:
Support customizing the alert for when there is no permission.
Add configuration option to center tools in tools collection view.
Fix:
Fix the bug where the crop ratio view is not hidden when there is only one ratio in the cropping interface.
Fix a bug that may cause failure when saving images from iCloud to local storage.
● 4.5.2
Fix:
Fix the bug in the image cropping interface where the image is not displayed correctly when zooming in and the crop ratio is not 0.
...

Languages

🇨🇳 Chinese, 🇺🇸 English, 🇯🇵 Japanese, 🇫🇷 French, 🇩🇪 German, 🇷🇺 Russian, 🇻🇳 Vietnamese, 🇰🇷 Korean, 🇲🇾 Malay, 🇮🇹 Italian, 🇮🇩 Indonesian, 🇪🇸 Spanish, 🇵🇹 Portuguese, 🇹🇷 Turkish, 🇸🇦 Arabic, 🇳🇱 Dutch.

Installation

There are four ways to use ZLPhotoBrowser in your project:

CocoaPods

To integrate ZLPhotoBrowser into your Xcode project using CocoaPods, specify it to a target in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'MyApp' do
  # your other pod
  # ...
  pod 'ZLPhotoBrowser'
end

Then, run the following command:

$ pod install

If you cannot find the latest version, you can execute pod repo update first

Carthage

To integrate ZLPhotoBrowser into your Xcode project using Carthage, specify it in your Cartfile:

github "longitachi/ZLPhotoBrowser"

Then, run the following command to build the ZLPhotoBrowser framework:

$ carthage update

If you get an error like Building universal frameworks with common architectures is not possible. The device and simulator slices for "ZLPhotoBrowser" both build for: arm64 Rebuild with --use-xcframeworks to create an xcframework bundle instead. Click this link.

Swift Package Manager

  1. Select File > Add Packages. Enter https://github.com/longitachi/ZLPhotoBrowser.git in the "Choose Package Repository" dialog.
  2. In the next page, specify the version resolving rule as "Up to Next Major" with "4.5.4" as its earliest version.
  3. After Xcode checking out the source and resolving the version, you can choose the "ZLPhotoBrowser" library and add it to your app target.

Support

Demo Effect

image

image

image

image