Remove the bottom panel / bezel on the external ios display when using the Lightning HDMI adapter

I struggled with this for a while.

As we all probably know, the Lightning HDMI adapter does not support 1080p output when it comes to applications that use the connected display as a second screen (the only way to achieve 1080p is streaming video, but, unfortunately, it's not my business) .

The maximum output resolution is 1600x900, which may be good in my case, but I absolutely need to get rid of the “black frame” around my window, and I cannot figure out how to do this. The only way I was able to do this was to manually stretch the image of the TV in the television menu, but, as you can probably imagine, is not a viable solution for my final product.

I tried

secondScreen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame | UIScreenOverscanCompensationInsetBounds; 

no luck: my problem is not "too", "overshot", and I'm afraid that the OS can not know about the high resolution of the TV if the adapter says that 1600x900 is the highest.

If I connect my MacBookPro to the same TV and set up 1600x900 in the monitor settings, somehow the whole screen will be correctly changed to cover the entire physical area of ​​the TV with a lower resolution and without a black frame. I would like to know if there is a similar option to install in the iOS ecosystem.

I also tried to force 720p output with something like this

 for (UIScreenMode* mode in secondScreen.availableModes) { NSLog(@"%f %f",mode.size.width,mode.size.height); if (mode.size.height == 720) { secondScreen.currentMode = mode; } } 

since you cannot manually create UIScreenMode, but it still uses 1600x900. And everything is very difficult to debug, because lightning adapters do not have a data connection (only charging), so I can not use XCODE debugging at all ...

I also tried with AirPlay and VGA Adapter, 1080p works like a charm, but for various reasons I need to use HDMI. iOS8 did not fix this problem, unfortunately

Does anyone have a really good idea? Thanks to everyone.

UPDATE 1:

I also found that a VGA adapter may give you problems connecting an old 1080p monitor / TV, but without (for example) an HDMI input (I know this is not VGA related, I'm just trying to explain how many years this monitor was even subject to a resolution of 1920x1080. It was a SHARP plasma TV at the client’s booth, I don’t know the correct model).

When connected to an iPad Air with a VGA adapter, the output was 1024x768, and the console logged out, for example, "unable to identify the UUID screen." I also tried using an HDMI cable (since there was no HDMI input on the monitor, I had to use the HDMI → DVI adapter at the end of the monitor), but all I had was the usual 1600x900.

However, I was able to solve the problem, but I still can’t explain WHY it worked: I connected the lightning adapter to HDMI in the ipad, and then connected the HDMI-VGA adapter (does not apply to Apple at all) and then connected a long VGA cable to the monitor . 1920x1080 like a charm.

It should not be possible (I have in some way the full resolution of hd via the HDMI / lightning adapter, which can only output 1600x900 max), but it worked, let it try if you are REALLY in trouble as I was.

In addition, please note that the result will differ depending on different TVs / monitors / screens. This is completely unreliable.

+5
source share
1 answer

if you are trying to get rid of scanned / borders then I suggest you scale the compensation of the end as shown in the code below. I tested it with an hdmi lighting cable, it works well on external displays without borders. Hope this helps. greetings

code example:

 if UIScreen.screens.count > 1 { let secondScreen = UIScreen.screens[1] secondScreen.overscanCompensation = UIScreenOverscanCompensation(rawValue: UIScreenOverscanCompensation.scale.rawValue.advanced(by: 2))! secondWindow = UIWindow(frame: secondScreen.bounds) secondWindow?.screen = secondScreen secondWindow?.isHidden = false } 
+1
source

Source: https://habr.com/ru/post/1203404/


All Articles