外部ディスプレイに全画面表示したいだけです。
私は次のようなコードを使用しています:
- (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;
}
}
}
外部デバイスでは全画面表示できません。
コードを から に変更する
screen.overscanCompensation = UIScreenOverscanCompensationInsetBounds;
と
screen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame;
、全画面表示できますが、ポイント (0,0) が左画面の上部にありません。
私の目標は、画面を全画面表示し、画面の左上隅にポイント (0, 0) を表示することです。しかし、うまくいきません。
前もって感謝します