views:

457

answers:

1

I am creating an app in which, as soon as the uiimagepickercontroller loads (i.e. the camera view), it should start taking pictures without any click and store images in an array. How can I do this without clicking on the "shoot" button?

In reference library, uiimagepickercontroller contains an instance method, takepicture. Can somebody tell me if this function will do the trick, if I call it through timer?

Thanks in advance.

+1  A: 

Hi Sharhelia,

-takePicture should do the trick in deed. You have to provider a custom UI for the camera controls, because otherwise (for me) it doesn't work. Check out the developer documentation in Xcode and search for takePicture. The method description has everything you need.

Andres
thnaks andres, then i think i have to upgarade os 3.1
sharhelia
Yes, you would have to upgrade to OS 3.1. If you want to do it without having to upgrade, you can use a screengrab method, such as `CGImageRef cgScreen = UIGetScreenImage();`, which will get you an image of what is currently being displayed on the iphone screen.
Andres
I assume you are trying the same thing I am. TakePicture simply allows programmatic access to what was the take picture button. It doesnt allow repeated photo taking as far as I know which is a shame. The CGImageRef idea works great BUT it is likely to be rejected by the App Store
Oni