iPhone Simulator 4.0.2 中 UIScreen 比例因子为 1.0?

发布于 2024-09-24 02:40:54 字数 425 浏览 0 评论 0原文

我是否遗漏了有关 iPhone 4 上的 @2x 图形的信息?

我在 iPhone 模拟器中运行 4.0.2 SDK,但 UIScreen 的比例为 1.0,不是应该是 2.0 并自动加载高分辨率图像吗?

这是我正在测试的内容:

 NSLog(@"system version: %@", [[UIDevice currentDevice] systemVersion]);
 NSLog(@"scale factor: %.1f ", [[UIScreen mainScreen] scale]);

它打印:

系统版本:4.0.2

比例因子:1.0

是模拟器的问题吗?或者我错过了一些需要启用才能使 UIScreen 允许 2x 图形的神奇按键?

Am I missing something about the @2x graphics on the iPhone 4?

I'm running the 4.0.2 SDK in the iPhone Simulator, but UIScreen has a scale of 1.0, isn't it supposed to be 2.0 and load high res images automatically?

here's what's I'm testing:

 NSLog(@"system version: %@", [[UIDevice currentDevice] systemVersion]);
 NSLog(@"scale factor: %.1f ", [[UIScreen mainScreen] scale]);

and it prints:

system version: 4.0.2

scale factor: 1.0

Is it a problem in the Simulator? Or I miss some magical key that I need to enable to make the UIScreen allow 2x graphics?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紅太極 2024-10-01 02:40:54

您使用的是 iPhone 4 模拟器吗?

硬件->设备-> iPhone 4。

比例取决于设备,而不是操作系统版本。

Are you using the iPhone 4 simulator?

Hardware -> Device -> iPhone 4.

The scale depends on the device, not the OS version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文