- Features
- Requirements
- Usage
- Update Log
- Languages
- Installation(support Cocoapods/Carthage/SPM)
- Demo Effect
Detailed usage of Swift
and OC
, please refer to Wiki
- 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
- iOS 10.0
- Swift 5.x
- Xcode 12.x
- 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
● 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;
...
🇨🇳 Chinese, 🇺🇸 English, 🇯🇵 Japanese, 🇫🇷 French, 🇩🇪 German, 🇷🇺 Russian, 🇻🇳 Vietnamese, 🇰🇷 Korean, 🇲🇾 Malay, 🇮🇹 Italian.
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)
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
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
- Select File > Swift Packages > Add Package Dependency. Enter https://github.com/longitachi/ZLPhotoBrowser.git in the "Choose Package Repository" dialog.
- In the next page, specify the version resolving rule as "Up to Next Major" with "4.0.8" as its earliest version.
- After Xcode checking out the source and resolving the version, you can choose the "ZLPhotoBrowser" library and add it to your app target.
- Video editor
- Multi-language
- Custom camera