【问题标题】:iOS image file names for iPad Air 2 and iPad Pro适用于 iPad Air 2 和 iPad Pro 的 iOS 图像文件名
【发布时间】:2016-02-05 07:26:02
【问题描述】:

“iOS Human Interface Guidelines” 中说明 iPad 的图像尺寸是多少:

iPad Air 2 - [1536 x 2048] = @2x
iPad Pro – [2048 x 2732] = @2x

我对视网膜 iPad Air 2 [1536 x 2048] 使用这样的命名约定:

背景@2x~ipad.png

但是必须为 iPad Pro 指定哪个名称 - [2048 x 2732]?

【问题讨论】:

  • 你说的是启动图片还是其他图片?
  • rmaddy> 图像用作应用程序的背景,或用作其他用户界面元素的背景,我加载它们: UIImage* anImage = [UIImage imageNamed:@"MyImage.png"];跨度>
  • 您引用的 HIG 不包括此类图像。并且此类图像没有标准命名约定。而UIImage imageNamed: 不容易支持这样的图像。您可以自行命名和加载此类图像。
  • rmaddy> 我是 iOS 开发的初学者,你更让我困惑 ;) 在资源编程指南 (developer.apple.com/library/ios/documentation/Cocoa/Conceptual/…) 中说我可以使用像 '@2x' 或 '~ipad' 这样的前缀来分配特殊设备的特殊图像。
  • rmaddy> 其他关于大小和文件名约定的好文章:developer.xamarin.com/guides/ios/application_fundamentals/… 还是我误解了?

标签: ios image ipad size retina


【解决方案1】:

正如我所见,https://github.com/kevindelord/UIImage-Autoresize 试图解决这个问题。不过我自己还没试过。

【讨论】:

    猜你喜欢
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    • 2012-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-19
    • 1970-01-01
    相关资源
    最近更新 更多