Reputation: 1155
I'm adding a cameraOverlay to my UIImagePickerController, it shows and all but it doesn't register touches. I init a button in the viewDidLoad and a one via IB.
Is there some rule that prohibits me from adding a UIButton to a cameraOverlayView and register touches?
Thanks
Upvotes: 1
Views: 1195
Reputation: 6006
I had a similar problem, and it turned out that my overlay UIView's frame was not large enough. The clipsToBounds
property for a UIView is by default set to NO, which means its subviews are still visible even if they are outside the parent's frame.
So essentially, make sure your overlay's frame is large enough, or that your subviews of the overlay are positioned within its bounds.
Upvotes: 2