小编MAB*_*MAB的帖子

iOS Swift 2录制视频AVCaptureSession

我创建了一个AVCaptureSession并将前置摄像头连接到它上面

do {
   try captureSession.addInput(AVCaptureDeviceInput(device: captureDevice))
   }catch{print("err")}
Run Code Online (Sandbox Code Playgroud)

现在我想开始并停止在touche事件上录制.我该怎么做呢?

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
        print("touch")
        //Start Recording
    }

override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
        print("release");
        //End Recording and Save
    }
Run Code Online (Sandbox Code Playgroud)

video ios avcapturesession swift

4
推荐指数
1
解决办法
3267
查看次数

标签 统计

avcapturesession ×1

ios ×1

swift ×1

video ×1