Swiftpack.co - longitachi/ZLPhotoBrowser as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by longitachi.
longitachi/ZLPhotoBrowser 4.3.7
Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
⭐️ 4,255
🕓 1 week ago
iOS
.package(url: "https://github.com/longitachi/ZLPhotoBrowser.git", from: "4.3.7")

Version Carthage compatible SPM supported License Platform Language

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

  • ☑ iOS14 supported.
  • ☑ Portrait and landscape.
  • ☑ Two framework style.
  • ☑ Preview selection (Support drag and drop).
  • ☑ Library selection (Support sliding selection).
  • ☑ Image/Gif/LivePhoto/Video.
  • ☑ Customize the maximum number of previews or selection, the maximum and minimum optional duration of the video.
  • ☑ Customize the number of columns displayed in each row.
  • ☑ Image editor (Draw/Crop/Image sticker/Text sticker/Mosaic/Filter/Adjust(Brightness, Contrast and Saturation)), (Draw color can be customized; Crop ratio can be customized; Filter effect can be customized; You can choose the editing tool you want).
  • ☑ Video editor.
  • ☑ Custom camera.
  • ☑ Multi-language.
  • ☑ Selected index.
  • ☑ Selected/unselectable state shadow mask.
  • ☑ The selected photos are displayed at the bottom of the big picture interface, which can be dragged and sorted.
  • ☑ The camera's internal photo cell can displays the captured images of the camera.
  • ☑ Customize font.
  • ☑ The color of each part of the framework can be customized (Provide dynamic color can support light/dark mode).
  • ☑ Customize images.

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

Requirements

  • iOS 10.0
  • Swift 5.x
  • Xcode 12.x

Usage

  • Preview selection
let ps = ZLPhotoPreviewSheet()
ps.selectImageBlock = { [weak self] results, isOriginal in
    // your code
}
ps.showPreview(animate: true, sender: self)
  • Library selection
let ps = ZLPhotoPreviewSheet()
ps.selectImageBlock = { [weak self] results, isOriginal in
    // your code
}
ps.showPhotoLibrary(sender: self)
  • Pay attention, you need to add the following key-value pairs in your app's Info.plist
// If you don’t add this key-value pair, multiple languages are not supported, and the album name defaults to English
Localized resources can be mixed   YES

Privacy - Photo Library Usage Description

Privacy - Camera Usage Description

Privacy - Microphone Usage Description

Change Log

More logs

● 4.3.7
  Add:
    Modify the parameter type of selectImageBlock and use ZLResultModel for callback. Delete shouldAnialysisAsset property.
    Photo editor adapts to iPad.
    Arabic supported.
    Support redo in graffiti and mosaic tools.
    Support for modifying the tint color of the image editor icon.
  Fix:
    Fix the bug of getting the wrong version of the video when editing the video.
● 4.3.6
  Add:
    Provide a method to save the PHAsset to local.
    Updated the method of parsing GIF.
  Fix:
    Fixed crash in pop interactive transition.
● 4.3.5
  Add:
    Support custom alert style.
    Improve the experience of image editor.
...

Languages

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

Installation

There are four ways to use ZLPhotoBrowser in your project:

  • using CocoaPods
  • using Carthage
  • using Swift Package Manager
  • manual install (build frameworks or embed Xcode 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 > Swift Packages > Add Package Dependency. 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.0.9" 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

  • ★ Star this repo.
  • Support with or or

Demo Effect

  • Selection image image image

  • Image editor

image

  • Video editor

image

  • Multi-language

image

  • Custom camera

image

GitHub

link
Stars: 4255
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

4.3.7
1 week ago

Add

  • Modify the parameter type of selectImageBlock and use ZLResultModel for callback. Delete shouldAnialysisAsset property.
  • Photo editor adapts to iPad.
  • Arabic supported. @LastSoul
  • Support redo in graffiti and mosaic tools.
  • Support for modifying the tint color of the image editor icon.

Fix:

  • Fix the bug of getting the wrong version of the video when editing the video.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics