一、ios点击拍照长按录像,效果图如下:
二、使用方法
1、必要权限申请
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
2、下载项目(项目地址后面放出)
将 ~/WJCamera 托入到你的项目中
或者
直接使用 pod 'WJCamera'
3、引入 #import "WJCameraController.h"
……
// 初始化
WJCameraController *wjc =[[WJCameraController alloc]initWithTakeMode:ALL delegate:self];
wjc.modalPresentationStyle = UIModalPresentationOverFullScreen;
[self presentViewController:wjc animated:YES completion:nil];
……
实现代理 CameraDelegate
//录制成功
- (void)recodeVideoComplete:(NSURL * _Nullable)videoPath ;
//拍照成功
- (void)takePhotoComplete:(UIImage * _Nullable)image ;