AnyImageKit
is a toolbox for picking and editing photos. It's written in Swift.
- 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 ( Technical Preview )
- Drawing
- Emoji
- Input text
- Cropping
- Mosaic
- Multiple platform support
- iOS
- iPadOS ( Not support in editor )
- Mac Catalyst ( Technical Preview, Not support in editor )
- macOS
- tvOS
- iOS 10.0+
- Xcode 11.0+
- Swift 5.0+
Add this to Podfile
, and then update dependency:
pod 'AnyImageKit'
Add this to Cartfile
, and then update dependency:
github "AnyImageProject/AnyImageKit"
Unsupport
--no-use-binaries
import AnyImageKit
let controller = ImagePickerController(delegate: self)
present(controller, animated: true, completion: nil)
/// ImagePickerControllerDelegate
func imagePickerDidCancel(_ picker: ImagePickerController) {
// Your code, handle cancel
picker.dismiss(animated: true, completion: nil)
}
func imagePicker(_ picker: ImagePickerController, didFinishPicking assets: [Asset], useOriginalImage: Bool) {
// Your code, handle select assets
let images = assets.map { $0.image }
picker.dismiss(animated: true, completion: nil)
}
/// 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
}
AnyImageKit is released under the MIT license. See LICENSE for details.