CameraOverlayView buttons

北城以北 提交于 2020-01-05 08:21:35

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/3996425/cameraoverlayview-buttons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!