以像素为单位的屏幕尺寸 (iPhone 6)

Screen size in pixels (iPhone 6)

根据此处的页面:http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions iPhone 6 屏幕尺寸(以像素为单位)应为 750×1334(1334x750 横向),但我的应用程序似乎认为屏幕尺寸为 667/375风景并且它没有正确呈现到整个屏幕。这是我在应用程序和 opengl 启动时用来获取 window 尺寸的代码。

applicationDidFinishLaunching:

CGRect rect = [[UIScreen mainScreen] bounds];
CGFloat screenW = rect.size.width;
CGFloat screenH = rect.size.height;

初始化GL:

CGRect rect = [glView bounds];
CGFloat screenW = rect.size.width;
CGFloat screenH = rect.size.height;
glOrthof(0, screenW, 0, screenH, -1, 1);

两个函数打印出相同的值:667w/375h。这可能与我遇到的初始图像问题有关吗,基本上我必须将它从 Default-667h@2x.png 重命名为 Default-375w-667h@2x.png 才能正确加载它?我觉得这很简单,我在这里缺少任何帮助。

没关系。你看到的是逻辑点。这些被翻译成物理像素。在 iPhone 6 的情况下,它是 2x。