1
私はAVCaptureSessionでViewControllerを持っています。私は簡単にAVCaptureSessionを開始および停止することができますViewControllerから離れるときにAVCaptureSessionを停止する
var captureSession: AVCaptureSession?
captureSession = AVCaptureSession()
//start
captureSession?.startRunning()
//stop
captureSession?.stopRunning()
Aは、ユーザーが別のViewControllerを開いたとき、私はAVCaptureSessionを停止することができます方法を知りたいです。
例えば 'viewWillDisappear'では、 – Larme