防止通话中状态栏影响视图

防止通话中状态栏影响视图

本文介绍了防止通话中状态栏影响视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

是否可以防止通话状态栏影响我的应用视图?

Is it possible to prevent the in-call status bar from affecting my app's views?

我希望通话中的状态栏可以简单地显示在视图顶部,而不影响其框架(既不改变高度,也不改变原点并向下推视图).

I would like the in-call status bar to ideally simply appear on top of my view and not affect its frame (neither by changing the height nor by changing the origin and pushing the view down).

有可能吗?

推荐答案

回答我自己的问题,为此,我能找到的最佳解决方案是手动更改主视图的框架以从原点开始并具有整个屏幕(宽度和高度).这样,您将获得与使用导航控制器相同的效果,例如,使用导航控制器时,视图保持原样,而呼叫状态栏似乎位于其顶部(在不同的层上,而不会影响应用程序视图的显示).

Answering my own question, the best solution I was able to find for this is to manually change the main view's frame to start at the origin and have the size of the entire screen (both width and height). That way, you receive the same effect as you would if you were to use a navigation controller for example, where the view remains in place and the in-call status bar appears to be on top of it (on a different layer, without affecting the app view's display).

这篇关于防止通话中状态栏影响视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 19:27