I just want to show full screen on External Display.
I'm using the code like this:
- (void) startTvOut {
NSArray *screens = [UIScreen screens];
CGSize max;
max.width = 0;
max.height = 0;
UIScreenMode *maxScreenMode = nil;
for (UIScreen *screen in screens)
{
if (screen != [UIScreen mainScreen])
{
for(int i = 0; i < [[screen availableModes] count]; i++)
{
UIScreenMode *current = [[screen availableModes] objectAtIndex: i];
if (current.size.width > max.width)
{
max = current.size;
maxScreenMode = current;
}
}
if (exWindow == nil)
{
exWindow = [[HUWindow alloc] initWithFrame:screen.brounds];
exWindow.backgroundColor = [UIColor whiteColor];
}
screen.overscanCompensation = UIScreenOverscanCompensationInsetBounds;
screen.currentMode = screen.preferredMode;
exWindow.screen = screen;
[exWindow makeKeyAndVisible];
m_isStarted = YES;
}
}
}
It can't show full screen on external device.
After I change the code
from
screen.overscanCompensation = UIScreenOverscanCompensationInsetBounds;
to
screen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame;
it can show full screen, but the point (0,0) is not at the top of left screen.
My goal is to show the screen with full screen and have the point (0, 0) at the upper left corner of the screen. But it doesn't work.
Thanks in advance