如何从iPad启用1920x1080外接显示器?

时间:2013-04-23 21:32:44

标签: ios objective-c ipad external-display

我正在尝试通过Lightning AV适配器从iPad 4(型号MD513LL / A)设置以1920x1080运行的外接显示器。当我解析每种可用模式时,我看到以下内容:

  • 1600×900
  • 1280×720
  • 1024×768
  • 800×600
  • 640×480
  • 720×480

我用三台现代(1-2岁)电视对其进行了测试,并在每台显示器上获得了相同的结果,却没有看到1920x1080。这是我用于外部显示的代码。

编辑:我发现这只是Lightning数字AV适配器的问题,而不是原来的数字AV适配器。

if ([[UIScreen screens] count] > 1)
{
    UIScreen *secondScreen = [[UIScreen screens] objectAtIndex:1];
    NSString *availableModeString;

    for (int i = 0; i < secondScreen.availableModes.count; i++)
    {
        availableModeString = [NSString stringWithFormat:@"%f, %f",
        ((UIScreenMode *)[secondScreen.availableModes objectAtIndex:i]).size.width,
        ((UIScreenMode *)[secondScreen.availableModes objectAtIndex:i]).size.height];

        [[[UIAlertView alloc] initWithTitle:@"Available Mode" message:availableModeString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
        availableModeString = nil;
    }

    // undocumented value 3 means no overscan compensation
    secondScreen.overscanCompensation = 3;

    self.secondWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 1280, 720)];
    self.secondWindow.backgroundColor = [UIColor blueColor];
    self.secondWindow.screen = secondScreen;

    T9SecondaryScreenViewController *viewController = [[T9SecondaryScreenViewController alloc] initWithNibName:@"T9SecondaryScreenViewController" bundle:nil];
    self.secondWindow.rootViewController = viewController;

    self.secondWindow.hidden = NO;
}

1 个答案:

答案 0 :(得分:3)

不幸的是,这个适配器不支持1080p。

Source