ALCameraViewControllerExtended 2.4

ALCameraViewControllerExtended 2.4

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2016年11月
SPM支持 SPM

Clemens Hammerl 维护。



  • Alex Littlejohn

ALCameraViewController

一个带有自定义图片选择器和图片裁剪的相机视图控制器。使用 Swift 编写。

camera cropper library permissions

特性

  • 支持前置和后置摄像头
  • 简洁的界面
  • 带有权限检查的自定义图片选择器
  • 图片裁剪(仅方形)
  • 支持闪光灯

安装 & 要求

该项目需要 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 文件。