AnyImageKit
is a toolbox for picking, editing or capturing photos/videos, written in Swift.
- Modular design
- Picker
- Browser
- Editor
- Capture
- 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
- Photo
- Video
- Live Photo
- GIF
- Fliter Support
- Edit image ( Technical Preview )
- Drawing
- Emoji
- Input text
- Cropping
- Mosaic
- Rotate
- Fliter Support
- Multiple platform support
- iOS
- iPadOS
- Mac Catalyst ( Technical Preview, Not support in editor.)
- macOS
- tvOS
- Internationalization support
- English (en)
- Chinese, Simplified (zh-Hans)
- Turkish (tr)
- Portuguese(Brazil) (pt-BR)
- and more... (Pull requests welcome)
- iOS 12.0+
- Xcode 13.0+
- Swift 5.5+
dependencies: [
.package(url: "https://github.com/AnyImageProject/AnyImageKit.git", .upToNextMajor(from: "0.13.0"))
]
Add this to Podfile
, and then update dependency:
pod 'AnyImageKit'
Add this to Cartfile
, and then update dependency:
github "AnyImageProject/AnyImageKit"
Add these keys to your Info.plist when needed:
Key | Module | Info |
---|---|---|
NSPhotoLibraryUsageDescription | Picker | |
NSPhotoLibraryAddUsageDescription | Picker | |
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 | Capture | |
NSMicrophoneUsageDescription | Capture |
import AnyImageKit
class ViewController: UIViewController {
@IBAction private func openPicker(_ sender: UIButton) {
var options = PickerOptionsInfo()
/*
Your code, handle custom options
*/
let controller = ImagePickerController(options: options, delegate: self)
present(controller, animated: true, completion: nil)
}
}
extension ViewController: ImagePickerControllerDelegate {
func imagePickerDidCancel(_ picker: ImagePickerController) {
/*
Your code, handle user cancel
*/
picker.dismiss(animated: true, completion: nil)
}
func imagePicker(_ picker: ImagePickerController, didFinishPicking result: PickerResult) {
let images = result.assets.map { $0.image }
/*
Your code, handle selected assets
*/
picker.dismiss(animated: true, completion: nil)
}
}
Version | Release Date | Xcode | Swift | iOS |
---|---|---|---|---|
v0.13.4 | 2021-09-23 | 13.0 | 5.5 | 12.0+ |
v0.13.3 | 2021-08-09 | 12.5 | 5.4 | 10.0+ |
v0.13.2 | 2021-06-30 | 12.5 | 5.4 | 10.0+ |
v0.13.1 | 2021-06-01 | 12.5 | 5.4 | 10.0+ |
v0.13.0 | 2021-02-08 | 12.4 | 5.3 | 10.0+ |
v0.12.0 | 2020-12-30 | 12.2 | 5.3 | 10.0+ |
v0.11.0 | 2020-12-18 | 12.2 | 5.3 | 10.0+ |
v0.10.0 | 2020-11-03 | 12.1 | 5.3 | 10.0+ |
v0.9.0 | 2020-10-09 | 12.0 | 5.3 | 10.0+ |
AnyImageKit is released under the MIT license. See LICENSE for details.