views:

835

answers:

1

I have a problem where I need to display the UIImagePickerController as a camera view and capture swipes on the user's screen. Currently I display the imagePicker in my custom view controller, then call its presentModalViewController for the camera. Once the camera is displayed, I insert a view on the top to capture the user's swipe gestures. The only thing is this isn't working. No swipes are coming through.

When I show the controller modally, do I lose the option to capture the touches? I don't want to use any undocumented APIs to do the job. Anyone have or had a similar problem?

A: 

Another option could be having an UIApplication subclass override sendEvent:. I haven't tried with the image picker, but taps to the keyboard go through that particular funnel.

That said, both solutions (mine and yours) while technically they are not making use of undocumented APIs, they are making assumptions about layout of things on screen or view hierarchy or event order. Not something I'd rely on seeing working across OS versions.

duncanwilcox
I ended up creating a UIView subclass and forwarding touches to my main controller, which is working. Thanks for your response!
Sophtware
Sounds fancy to me ;-) Would you mind to post a snippet?
Stefan
My little trick to pass on touches does not working in 3.0. Not sure why. After toying with it for a while, I abandoned the code and left that feature out of my program.
Sophtware