测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2016年11月 |
SPM支持 SPM | ✗ |
由 Clemens Hammerl 维护。
一个带有自定义图片选择器和图片裁剪的相机视图控制器。使用 Swift 编写。
该项目需要 Xcode 8 运行,并使用 Swift 3.0 编译
ALCameraViewController 在 CocoaPods 上可用。将以下内容添加到 Podfile 中:
pod 'ALCameraViewController'
使用此组件非常简单。
在您的 ViewController 中
let croppingEnabled = true
let cameraViewController = CameraViewController(croppingEnabled: croppingEnabled) { [weak self] image, asset in
// Do something with your image here.
// If cropping is enabled this image will be the cropped version
self?.dismissViewControllerAnimated(true, completion: nil)
}
presentViewController(cameraViewController, animated: true, completion: nil)
ALCameraViewController 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。