有许多关于iPhone 6和iPhone 6 Plus屏幕尺寸的文章和问题。 This article提供了一个很好的解释。iPhone 6(Plus)屏幕尺寸
但是,我在模拟器中测试我的应用程序时感到困惑。 我在AppDelegate
下面的代码。
- (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
{
UIScreen *screen = [UIScreen mainScreen];
NSLog(@"Screen width %.0f px, height %.0f px, scale %.1fx",
(double) screen.bounds.size.width,
(double) screen.bounds.size.height,
(double) screen.scale);
return YES;
}
我从iPhone模拟器的结果如下各种装置:
iPhone 4S:Screen width 320 px, height 480 px, scale 2.0x
iPhone 5:Screen width 320 px, height 568 px, scale 2.0x
iPhone 5S:Screen width 320 px, height 568 px, scale 2.0x
iPhone 6: Screen width 320 px, height 568 px, scale 2.0x
iPhone 6 Plus:Screen width 320 px, height 568 px, scale 2.0x
结果对于iPhone 4S,iPhone 5和iPhone 5S来说都不错。不过,我预计iPhone 6和iPhone 6 Plus的屏幕尺寸会更大,我也希望iPhone 6 Plus的屏幕尺寸更大。哪里不对?
感谢您的解释。
您可能忘记为iPhone 6和6 Plus包含适当的启动图像。因此,该应用程序仅基于iPhone 5/5S版本进行了升级,这是您在应用程序中“看到”的尺寸。 – rdurand 2014-12-03 09:58:17