UIImagePickerController:自定义相机叠加坐在默认控件的顶部? [英] UIImagePickerController: Custom camera overlay sitting on top of default controls?

查看:437
本文介绍了UIImagePickerController:自定义相机叠加坐在默认控件的顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 UIImagePickerController cameraOverlayView 属性创建自定义摄像头UI。但是,我想保留一些现有的UI - 特别是顶部的闪光灯和相机选择按钮。



我的想法是我会保留 showsCameraControls = YES 设置 cameraOverlayView 到我的自定义UI,然后使用 [picker.view bringSubviewToFront:overlayView] 以确保底部的控件位于默认控件的顶部。



唉,这不行。我试着将覆盖层移动到视图层次结构的前面,在各种地方没有运气。 有没有任何 UIImagePickerController hackery可以解决这个问题?似乎很遗憾,不能重复使用至少一些相机控件,同时仍然自定义


解决方案

进一步调查显示这是不可能的。您必须使用所有默认的isara UI或不使用它。


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.

解决方案

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

这篇关于UIImagePickerController:自定义相机叠加坐在默认控件的顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆