All Projects → SilenceLove → HXPHPicker

SilenceLove / HXPHPicker

Licence: MIT license
Photo/Video Selector-Supports LivePhoto, GIF selection, online download of resources on iCloud, and editing of photos/videos

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to HXPHPicker

Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+936.4%)
Mutual labels:  picker, photo
Lassi-Android
All in 1 picker library for android.
Stars: ✭ 108 (-52.63%)
Mutual labels:  picker, photo
GWLPhotoSelector
相册照片多张选择控件
Stars: ✭ 50 (-78.07%)
Mutual labels:  picker, photo
Flutter photo manager
Provide flutter with the ability to manage photos.
Stars: ✭ 294 (+28.95%)
Mutual labels:  picker, photo
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+1505.7%)
Mutual labels:  picker, photo
Assetspickerviewcontroller
Powerfully Customizable - Multiple Photo & Video Picker Controller
Stars: ✭ 321 (+40.79%)
Mutual labels:  picker, photo
Flutter photo
Pick image/video from album by flutter. Support ios and android. UI by flutter, no native.
Stars: ✭ 285 (+25%)
Mutual labels:  picker, photo
Lgphotobrowser
照片浏览器,相册选择器,自定义照相机(支持单拍、连拍)
Stars: ✭ 527 (+131.14%)
Mutual labels:  picker, photo
MLDPhotoManager
弹出AlertController让用户选择相机还是相册.基于@gang544043963大神的LGPhotoBrowser项目再次封装
Stars: ✭ 19 (-91.67%)
Mutual labels:  picker, photo
wp-parsidate
Integrates the Solar Hijri (Persian) calendar in WordPress
Stars: ✭ 36 (-84.21%)
Mutual labels:  picker
PSCityPickerView
城市选择器,可以选择国内所有的城市和地区
Stars: ✭ 47 (-79.39%)
Mutual labels:  picker
PickColor
📌 Pick color in image, make placeholder color like Pinterest!
Stars: ✭ 53 (-76.75%)
Mutual labels:  picker
Pickme
iOS Picker for ninjas
Stars: ✭ 29 (-87.28%)
Mutual labels:  picker
HHChaosToolkit
A set of MVVM tookit class libraries for uwp platform.
Stars: ✭ 27 (-88.16%)
Mutual labels:  picker
flutter jd address selector
京东地址选择器
Stars: ✭ 26 (-88.6%)
Mutual labels:  picker
nbox
基于阿里云OSS的网盘客户端程序!
Stars: ✭ 31 (-86.4%)
Mutual labels:  photo
react-native-wheel-datepicker
Android & iOS iOS-style Picker & DatePicker Components for ReactNative
Stars: ✭ 72 (-68.42%)
Mutual labels:  picker
aaf-easyphotomap
📷 Easy Photo Map is a photomap application that displays the location of the photo on the map using the location information included in the photo.
Stars: ✭ 36 (-84.21%)
Mutual labels:  photo
react-native-single-select
Customizable & Easy to Use Single Select Library for React Native
Stars: ✭ 74 (-67.54%)
Mutual labels:  picker
PhoneNumberKit
Android Kotlin library to parse and format international phone numbers. Country code picker.
Stars: ✭ 124 (-45.61%)
Mutual labels:  picker

HXPHPicker is a photo/video selector-supports LivePhoto, GIF selection, iCloud resource online download, photo/video editing

中文说明

Features

  • UI Appearance supports light/dark/auto/custom
  • Support multiple selection/mixed content selection
  • Supported media types:
    • Photo
    • GIF
    • Live Photo
    • Video
  • Supported local media types:
    • Photo
    • Video
    • GIF
    • Live Photo
  • Supported network media types:
    • Photo
    • Video
  • Support downloading assets on iCloud
  • Support gesture back
  • Support sliding selection
  • Edit pictures (support animated pictures, network pictures)
    • Graffiti
    • Sticker
    • Text
    • Crop
    • Mosaic
    • Filter
  • Edit video (support network video)
    • Graffiti
    • Stickers (support GIF)
    • Text
    • Soundtrack (support lyrics and subtitles)
    • Crop duration
    • Crop Size
    • Filter
  • Album display mode
    • Separate list
    • Pop-ups
  • Multi-platform support
    • iOS
    • iPadOS
  • Internationalization support
    • English (en)
    • Chinese, Simplified (zh-Hans)
    • Chinese, traditional (zh-Hant)
    • Japanese (ja)
    • Korean (ko)
    • Thai (th)
    • Indonesian (id)
    • Vietnamese (vi)
    • Custom language (custom)
    • More support... (Pull requests welcome)

Requirements

  • iOS 12.0+
  • Xcode 12.5+
  • Swift 5.4+

Installation

Swift Package Manager

⚠️ Needs Xcode 12.0+ to support resources and localization files

dependencies: [
    .package(url: "https://github.com/SilenceLove/HXPHPicker.git", .upToNextMajor(from: "1.4.1"))
]

CocoaPods

Add this to Podfile, and then update dependency:

pod 'HXPHPicker'

/// No Kingfisher
pod `HXPHPicker/Lite`

/// Only Picker
pod `HXPHPicker/Picker`
pod `HXPHPicker/Picker/Lite`

/// Only Editor
pod `HXPHPicker/Editor`
pod `HXPHPicker/Editor/Lite`

/// Only Camera
pod `HXPHPicker/Camera`

Carthage

Add the following content to Cartfile and perform dependency update.

github "SilenceLove/HXPHPicker"

Usage

Wiki

Prepare

Add these keys to your Info.plist when needed:

Key Module Info
NSPhotoLibraryUsageDescription Picker Allow access to album
NSPhotoLibraryAddUsageDescription Picker Allow to save pictures to album
PHPhotoLibraryPreventAutomaticLimitedAccessAlert Picker Set YES to prevent automatic limited access alert in iOS 14+ (Picker has been adapted with Limited features that can be triggered by the user to enhance the user experience)
NSCameraUsageDescription Camera Allow camera
NSMicrophoneUsageDescription Camera Allow microphone

Quick Start

import HXPHPicker

class ViewController: UIViewController {

    func presentPickerController() {
        // Set the configuration consistent with the WeChat theme
        let config = PhotoTools.getWXPickerConfig()
        
        // Method 1:
        let pickerController = PhotoPickerController(picker: config)
        pickerController.pickerDelegate = self
        // The array of PhotoAsset objects corresponding to the currently selected asset
        pickerController.selectedAssetArray = selectedAssets 
        // Whether to select the original image
        pickerController.isOriginal = isOriginal
        present(pickerController, animated: true, completion: nil)
        
        // Method 2:
        Photo.picker(
            config
        ) { result, pickerController in
            // Select completion callback
            // result Select result
            //  .photoAssets Currently selected data
            //  .isOriginal Whether the original image is selected
            // photoPickerController Corresponding photo selection controller
        } cancel: { pickerController in
            // Cancelled callback
            // photoPickerController Corresponding photo selection controller
        }
    }
}

extension ViewController: PhotoPickerControllerDelegate {
    
    /// Called after the selection is complete
    /// - Parameters:
    ///   - pickerController: corresponding PhotoPickerController
    ///   - result: Selected result
    ///     result.photoAssets  Selected asset array
    ///     result.isOriginal   Whether to select the original image
    func pickerController(_ pickerController: PhotoPickerController, 
                            didFinishSelection result: PickerResult) {
        result.getImage { (image, photoAsset, index) in
            if let image = image {
                print("success", image)
            }else {
                print("failed")
            }
        } completionHandler: { (images) in
            print(images)
        }
    }
    
    /// Called when cancel is clicked
    /// - Parameter pickerController: Corresponding PhotoPickerController
    func pickerController(didCancel pickerController: PhotoPickerController) {
        
    }
}

Release Notes

Version Release Date Xcode Swift iOS
v1.4.1 2022-05-24 13.1.0 5.4.2 12.0+
v1.4.0 2022-04-13 13.1.0 5.4.2 12.0+
v1.3.9 2022-03-24 13.1.0 5.4.2 12.0+
v1.3.7 2022-02-19 13.1.0 5.4.2 12.0+
v1.3.5 2022-02-09 13.1.0 5.4.2 12.0+
v1.3.4 2022-01-26 13.1.0 5.4.2 12.0+
v1.3.3 2022-01-19 13.1.0 5.4.2 12.0+
v1.3.2 2022-01-14 13.1.0 5.4.2 12.0+
v1.3.1 2022-01-05 13.1.0 5.4.2 12.0+
v1.3.0 2021-12-16 13.1.0 5.4.2 12.0+
v1.2.9 2021-12-02 13.1.0 5.4.2 12.0+
v1.2.8 2021-11-26 12.5.1 5.4.2 12.0+

License

HXPHPicker is released under the MIT license. See LICENSE for details.

🔝

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].