iPad 2上带有HDMI适配器的黑条 [英] Black bars with HDMI Adapter on iPad 2
问题描述
我的应用程序支持HDMI输出。
My app supports HDMI Output.
我询问了电视分辨率的代码,获得了1920 x 1080像素
I asked the code for the resolution of the TV and got 1920 x 1080 px for
externalScreen.bounds
好的,一切精细。我设置了我的观点并在电视上试了...
OK, everything fine. I've setup my views and tried it on the TV ...
但是 黑条在屏幕的底部/顶部/侧面虽然电视被正确检测为1920 x 1080并且我的视图也正确设置了?
BUT: There were black bars on the bottom / top / sides of the screen though the TV was detected correctly as 1920 x 1080 and my view is also set up correctly?
为什么格式错误?
PS当我镜像主屏幕时,它还会显示条形图,当我用Youtube应用程序观看视频时,黑条消失了吗?
P.S. When I mirror the home screen, it also shows the bars, when I watch a video with the Youtube App, the black bars disappear?
感谢您的帮助!
更新:
好的,虽然我在控制台中输出了这个输出:
OK, although I got this output in my console:
A new screen got connected: <UIScreen: 0x3439a0; bounds = {{0, 0}, {1920, 1080}}; mode = <UIScreenMode: 0x345240; size = 1920.000000 x 1080.000000>>
...我仍然得到黑框。我用 CGRectMake(0.0f,0.0f,1920.0f,1080.0f)
初始化我的视图用于测试目的。
... I still get the black frame. I init my view with CGRectMake(0.0f,0.0f,1920.0f,1080.0f)
for test purposes.
这是我在屏幕上可以看到的视图(注意黑条):
This is the view I can see on my screen (note the black bars):
推荐答案
externalScreen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame;
这篇关于iPad 2上带有HDMI适配器的黑条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!