【发布时间】:2015-03-26 13:55:19
【问题描述】:
我有两个 PNG 文件:
- 568x320.png
- 667x375.png
如果我正在创建 UIImageView:
UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"568x320.png"]];
并在 iOS 模拟器中运行它 > iPhone 5/5s/6 (iOS 8.1) 图像覆盖全屏(即使在 iPhone 6 上)。另一方面,如果我正在创建 UIImageView:
UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"667x375.png"]];
并在 iOS 模拟器中运行 > iPhone 6 (iOS 8.1) 图像大于屏幕。怎么了?
附言。我没有使用 Storyboard(一切都以编程方式)
PS2。没有添加任何约束。
【问题讨论】:
-
您是否添加了所需的 iPhone 6 启动图像或启动屏幕文件?没有这些,iPhone 6 会以缩放模式运行应用程序。
标签: ios iphone uiimageview uiimage png