KRUBERLICK KRUBERLICK - 6 months ago 16
iOS Question

Integrating timer for camera app

I have a working app that captures photos using AVFoundation and I want to integrate a timer option, so that camera will capture photo after 10s. Any ideas how to do this?

Answer

Yes,In Timer button tap add below code

 self.cameraTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                        target:self
                                                      selector:@selector(capturePhoto)
                                                      userInfo:nil
                                                       repeats:NO ];

And capturePhoto you can set or call STillImageCapture method,You can change interval according your need.

Comments