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

后端 未结 3 1450
滥情空心
滥情空心 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:25

    Maybe a little late but the piker function has a property takePicture

    double delayInSecondse = 3.0;
    dispatch_time_t epopTime = dispatch_time(DISPATCH_TIME_NOW, delayInSecondse * NSEC_PER_SEC);
    dispatch_after(epopTime, dispatch_get_main_queue(), ^(void){
      [picker takePicture];
    });
    

提交回复
热议问题