美文网首页
FMCustomCamera 自定义相机(Swift)

FMCustomCamera 自定义相机(Swift)

作者: Fight_ing | 来源:发表于2020-12-23 19:52 被阅读0次
    tree_07.jpg
    • 可能用到的delegate接口说明
        /// 闪光灯
        func flashLightAction(_ cameraView: FMCameraView, handler: ((Error?) -> ()))
        /// 补光
        func torchLightAction(_ cameraView: FMCameraView, handler: ((Error?) -> ()))
        /// 转换摄像头
        func swicthCameraAction(_ cameraView: FMCameraView, handler: ((Error?) -> ()))
        /// 自动聚焦曝光
        func autoFocusAndExposureAction(_ cameraView: FMCameraView, handler: ((Error?) -> ()))
        /// 聚焦
        func focusAction(_ cameraView: FMCameraView, point: CGPoint, handler: ((Error?) -> ()))
        /// 曝光
        func exposAction(_ cameraView: FMCameraView, point: CGPoint, handler: ((Error?) -> ()))
        /// 缩放
        func zoomAction(_ cameraView: FMCameraView, factor: CGFloat)
    
        /// 关闭
        func closeAction(_ cameraView: FMCameraView)
        /// 取消
        func cancelAction(_ cameraView: FMCameraView)
        /// 确定
        func confirmAction(_ cameraView: FMCameraView)
        /// 拍照
        func takePhotoAction(_ cameraView: FMCameraView, handler: @escaping ((Error?) -> ()))
        /// 停止录制视频
        func stopRecordVideoAction(_ cameraView: FMCameraView)
        /// 开始录制视频
        func startRecordVideoAction(_ cameraView: FMCameraView)
        /// 改变拍摄类型 photo:拍照 video:视频
        func didChangeTypeAction(_ cameraView: FMCameraView, type: FMCameraType)
    
    • 自定义UI见面,可以自行修改FMCameraView中的代码

    • 相机界面初始化,可参照FMCustomCameraViewController

    Demo

    相关文章

      网友评论

          本文标题:FMCustomCamera 自定义相机(Swift)

          本文链接:https://www.haomeiwen.com/subject/odpunktx.html