UIImagePickerController: Custom camera overlay sitting on top of default controls?

我的梦境 提交于 2019-12-07 18:06:47

问题


I'm creating a custom camera UI using UIImagePickerController cameraOverlayView property. However, I'd like to keep some of the existing UI -- specifically the flash and camera selection buttons at the top.

My thought was that I'd keep showsCameraControls = YES set the cameraOverlayView to my custom UI and then use [picker.view bringSubviewToFront:overlayView] to make sure my controls on the bottom are sitting on top of the default controls.

Alas, this does not work. I've tried moving the overlay to the front of the view hierarchy in various places without luck. Is there any UIImagePickerController hackery that could achive this? It seems a shame not to be able to reuse at least some of the camera controls while still customizing the UI.


回答1:


Further investigation it appears this is not possible. You either have to use all of the default cameara UI or none of it.



来源:https://stackoverflow.com/questions/5251336/uiimagepickercontroller-custom-camera-overlay-sitting-on-top-of-default-control

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