views:

543

answers:

1

HI Guys! I'm working on a camera application. I want to use a timer to take a photo (without user interaction). But apple provides only UIImagePicker to take snapshots and create videos. is there any other way to do this. or there is a way to take a image automatically through ImagePicker without pressing the take picture button.

Thanks

+2  A: 

There's no direct way of accessing the camera. For, what I understand to be, privacy reasons, Apple forces developers to through the image picker. How ever, there are applications that provide an alternative view & functionality. They work by loading the image picker, but then modifying the subviews of the image picker.

To solve your problem however, this thread suggests that you might try finding out what the target & action of the Capture button in the ImagePicker are and then triggering that when your timer fires. That, however, might be problematic as it might show the "Use or Retake" screen. Another approach is to make the CameraView fullscreen and just capturing that view into a CGImage: see here for an example.

MathieuK