How to automatically take a picture without pressing the phototaken button on the imagepickercontroller?

后端 未结 3 1429
滥情空心
滥情空心 2021-01-14 13:47

In my project, I need to take pictures automatically every one minute. But I can\'t find out any solutions.

This is the code which I implemented but it doesn\'t work

3条回答
  •  孤城傲影
    2021-01-14 14:34

    Finally I figured out the solution.

    I use the

     AVCaptureVideoDataOutputSampleBufferDelegate
    

    to take pictures automatically.

    - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer   
       fromConnection:(AVCaptureConnection *)connection 
    

    It is pretty simple and thank you @sch all the same for your help :)

提交回复
热议问题