AnyImagePicker 0.4.3

AnyImagePicker 0.4.3

Maintained by RayJiang16, Liu Dong.



  • By
  • anotheren and RayJiang16

AnyImagePicker

Travis CI CocoaPods Compatible Carthage Compatible Platform License

AnyImagePicker is an image picker which support for multiple photos, GIFs or videos. It's written in Swift.

中文说明

Features

  • Light mode, dark mode or auto mode support
  • Default theme is similar with Wechat
  • Multiple & mix select support
  • Supported media types:
    • Photo
    • GIF
    • Live Photo
    • Video
  • Camera
  • Edit image
  • Multiple platform support
    • iOS
    • iPadOS
    • Mac Catalyst ( Technical Preview )
    • macOS
    • tvOS

Requirements

  • iOS 10.0+
  • Xcode 11.0+
  • Swift 5.0+

Installation

CocoaPods

Add this to Podfile, and then update dependency:

pod 'AnyImagePicker'

Carthage

Add this to Cartfile, and then update dependency:

github "AnyImageProject/AnyImagePicker"

Unsupport --no-use-binaries

Usage

Quick Start

import AnyImagePicker

let controller = ImagePickerController(delegate: self)
present(controller, animated: true, completion: nil)

/// ImagePickerControllerDelegate
func imagePicker(_ picker: ImagePickerController, didSelect assets: [Asset], useOriginalImage: Bool) {
    let image = assets.image
    // Your code
}

Fetch content data

/// Fetch Video URL 
/// - Note: Only for `MediaType` Video
/// - Parameter options: Video URL Fetch Options
/// - Parameter completion: Video URL Fetch Completion
func fetchVideoURL(options: VideoURLFetchOptions = .init(), completion: @escaping VideoURLFetchCompletion)

// Call
asset.fetchVideoURL { (result) in
    // Your code
}

License

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