简体   繁体   English

iPhone:摄像头覆盖层可以放在Tabbar Viewcontroller中吗?

[英]iPhone: Camera Overlay can fit in a Tabbar Viewcontroller?

I have a Tabbar application, where clicking on a tabbar item, i should show a Camera Overlay view , BUT it should not HIDE the tabbar, Camera overlay should just fit into the tabbar viewcontrollers, just like behind the tabbar view. 我有一个Tabbar应用程序,在其中单击Tabbar项,我应该显示Camera Overlay视图,但它不应该隐藏Tabbar,Camera overlay应该恰好适合Tabbar ViewController,就像在Tabbar视图后面一样。 I created a custom camera overlay and called UIImagePickerController to my customer camera overlay. 我创建了一个自定义摄影机叠加层,并将其命名为UIImagePickerController到我的客户摄影机叠加层。 But it opens up with full screen mode and hides my tabbar etc. 但是它以全屏模式打开,并隐藏了我的标签栏等。

pickerController.cameraOverlayView = camCumtomOverlay;

I even tried resized the custom camera overlay to small like below, but it open up the camera view with full screen and hides my entire tabbars. 我什至尝试将自定义相机叠加层的尺寸调整为如下所示的小尺寸,但是它以全屏方式打开了相机视图,并隐藏了我的整个标签栏。

myOwnOverlay = [[[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 300)] autorelease];

But i want to to fit that custom camera overlay into tabbar. 但我想将自定义摄像头叠加到选项卡中。 Could someone please advise me how to achieve it? 有人可以告诉我如何实现吗?

Thanks! 谢谢!

I presume you're using presentModalViewController: to present the picker. 我假设您正在使用presentModalViewController:来呈现选择器。 Modal view controllers will go over everything that's behind, so the tabbar will hide as well. 模态视图控制器将遍历后面的所有内容,因此标签栏也将隐藏。 You can add a tabbar in the overlay that acts the same as the main tabbar. 您可以在叠加层中添加一个与主选项卡相同的选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM