Overlaying the iPhone camera without blocking its controls

While developing FaceMerge, an iPhone/iPod app that lets you take pictures of people and merge them into funny faces, I came across a problem while overlaying the camera. I wanted to provide the user with just a bit of guidance while taking pictures within my app.

Since iOS 3.1, the UIImagePickerController class has a property named cameraOverlayView; setting a UIView of your own to this property causes it to appear on top of the camera when the picker is displayed.

I did just that: I created a custom UIView named CameraView, which had no background color and only one label on it; and then I set it to the picker. When the picker showed up, everything looked OK, but the camera controls did not respond to any touch event.

Continue reading