简体   繁体   English

如何在自定义摄像头叠加层上方显示状态栏?

[英]How to show status bar on top of custom camera overlay?

I have this critical issue with showing top statusbar on the custom camera overlay which seems impossible for me at the moment. 我在自定义摄像头叠加层上显示顶部状态栏时遇到了这个关键问题,目前对我而言这似乎是不可能的。 I posted the same question to Apple dev forum but did not get any response for some time now. 我在Apple开发人员论坛上发布了相同的问题,但一段时间未得到任何答复。 In my application, I have a custom overlay view set as the overlay to the UIImagePickerController. 在我的应用程序中,我将一个自定义的叠加视图设置为UIImagePickerController的叠加。 At the bottom of the custom overlay view (this is a UIViewController), I have put a toolbar that enables user to click on toolbar items. 在自定义叠加视图的底部(这是一个UIViewController),我放置了一个工具栏,使用户可以单击工具栏项。 Since the top statusbar is not shown when the camera opens up, the whole screen get pushed upwards and makes a narrow white color gap between the bottom of the screen and the bottom tool bar. 由于打开相机时未显示顶部状态栏,因此整个屏幕将向上推,并在屏幕底部和底部工具栏之间形成狭窄的白色间隙。

I am not aware of how to resolve this issue, but I think if we can show the top status bar on the top of the camera then this will be automatically get resolved. 我不知道如何解决此问题,但我认为,如果我们可以在相机顶部显示顶部状态栏,则将自动解决此问题。 Thanks for any answers. 感谢您的任何答案。

Had a similar problem a while back and all I did was resize my view. 前一段时间有类似的问题,我所做的只是调整视图大小。 Why not try that and see if it works. 为什么不试试看,看看是否可行。

If that doesn't work then showing the status bar should be 如果这不起作用,则显示状态栏应为

[[UIApplication sharedApplication] setStatusBarHidden:NO];

Thanks for the tip domino, I found how it should be done from this thread and resize the main uiview to 320x480 instead of default 320x460. 感谢您的技巧多米诺骨牌,我发现应该如何从此线程完成操作并将主uiview的大小调整为320x480,而不是默认的320x460。 Hope this will help someone else. 希望这会帮助别人。 Thanks. 谢谢。

Can't resize UIView in IB 无法在IB中调整UIView的大小

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

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