views:

402

answers:

2

Hi all,

I have been working around in UIImagePickerController and am struck with a problem where I need to get the precise moment when the camera shutter opens in UIImagePickerController when the source type is set to camera (UIImagePickerControllerSourceTypeCamera).

I have done some googling around and have realized that no one had such strange requirement!

I looked around the docs of UIImagePickerController and UIImagePickerControllerDelegate hoping to get some delegate method / callback indicating the camera shutter open event, but did not find any.

Any suggestions?

Thanks for any help,

Raj Pawan

A: 
yonel
@yonel, It does not work. viewDidAppear is called as soon as the image picker controller's view is displayed with the camera shutter closed.
Raj
hum, I didn't think the accuracy you were expecting was such "extreme" :) Maybe can you tell us why you need to get such accuracy in the timing of the opening of the camera shutter ? Maybe this would give ideas to "work around" this :/
yonel
I did some more googling with different key words (iris instead of shutter) and stumbled upon this: http://stackoverflow.com/questions/1570419/detecting-when-cameras-iris-is-open-on-iphone/1581317. It solves all my problem. I am keeping my fingers crossed, hope that apple wont reject it.
Raj
+1  A: 

The solution is to observe for a private notification, just as discussed in this thread: http://stackoverflow.com/questions/1570419/detecting-when-cameras-iris-is-open-on-iphone/1581317.

Raj