我正在尝试通过 Lightning AV 适配器从 iPad 4(型号 MD513LL/A)设置以 1920x1080 运行的外部显示器。当我解析每种可用模式时,我看到以下内容:
- 1600x900
- 1280x720
- 1024x768
- 800x600
- 640x480
- 720x480
我已经用三台现代(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;
}