gpt4 book ai didi

iPhone 4 显卡

转载 作者:行者123 更新时间:2023-12-03 20:29:13 25 4
gpt4 key购买 nike

我想为我的应用程序设计背景图像。图像应填满 iPhone 屏幕。什么图像尺寸适用于 3G 和 4G?

A) 320 x 480。B) 640 x 960。

我更喜欢使用 B,因为它的质量更高,3G 会调整图像大小以适应吗?

感谢您的帮助。

最佳答案

只需创作两种尺寸并使用 @2x 保存高分辨率。文件名中的后缀(如 background.png<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="472526242c20352832292307753f69372920" rel="noreferrer noopener nofollow">[email protected]</a> )。 iPhone 4 将使用高分辨率图像,较旧的设备将坚持使用普通图像。请参阅 +[UIImage imageNamed: 的文档:

This method looks in the system caches for an image object with the specified name and returns that object if it exists. If a matching image object is not already in the cache, this method loads the image data from the specified file, caches it, and then returns the resulting object.

On a device running iOS 4 or later, the behavior is identical if the device’s screen has a scale of 1.0. If the screen has a scale of 2.0, this method first searches for an image file with the same filename with an @2x suffix appended to it. For example, if the file’s name is button, it first searches for button@2x. If it finds a 2x, it loads that image and sets the scale property of the returned UIImage object to 2.0. Otherwise, it loads the unmodified filename and sets the scale property to 1.0. See iOS Application Programming Guide for more information on supporting images with different scale factors.

另请阅读 appropriate part iOS 应用程序编程指南。

关于iPhone 4 显卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3781923/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com