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