Git Product home page Git Product logo

mariobiuuuu / zlphotobrowser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from longitachi/zlphotobrowser

0.0 0.0 0.0 97.04 MB

A lightweight and pure Swift implemented library for select photos from album. Support select multiple photos, video, gif, livePhoto. Support edit image and crop video. 轻量级支持多选照片、视频选择框架,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑裁剪图片/视频,支持多语言国际化等功能;

License: MIT License

Objective-C 0.40% Ruby 0.18% Swift 99.41% C 0.01%

zlphotobrowser's Introduction

Version Carthage compatible  License Platform Language

image


中文简介

Directory

Detailed usage of Swift and OC, please refer to Wiki

Features

  • iOS14 support.
  • Portrait and landscape support.
  • Two framework style.
  • Preview selection (support drag and drop).
  • Library selection (support sliding selection).
  • Image/Gif/LivePhoto/Video Support.
  • 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/mosaic/filter), (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 feel free to 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] (images, assets, isOriginal) in
    // your code
}
ps.showPreview(animate: true, sender: self)
  • Library selection
let ps = ZLPhotoPreviewSheet()
ps.selectImageBlock = { [weak self] (images, assets, 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

Update Log

More logs

● 4.0.8: Add filter to image editor;
● 4.0.7: Image editor support crop ratios; Custom camera supports switching camera during recording; bug fixed;
● 4.0.5: Support iOS14 limited authority; Optimize picture preview display;
...

Languages

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

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 ZLPhotoBrowser

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.8" 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.

Demo Effect

  • Selection image image image

  • Image editor

image

  • Video editor

image

  • Multi-language

image

  • Custom camera

image

zlphotobrowser's People

Contributors

longitachi avatar kkkgit avatar changsanjiang avatar kinarobin avatar ly541349042 avatar goodheart avatar maligh avatar mouse-lin avatar zhugexiaobo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.