【问题标题】:How to manage universal app and their images for iPhone, iPod and iPad如何管理 iPhone、iPod 和 iPad 的通用应用程序及其图像
【发布时间】:2013-07-22 17:59:54
【问题描述】:

我要开发一个新的应用程序。对于每个屏幕(UIViewController),我将使用单独的 xib。

因此,每个屏幕也会有不同的图像。

目前,我想在以下设备上使用我的应用。

  1. iPhone 3
  2. iPhone 3GS
  3. iPhone 4
  4. iPhone 4S
  5. iPhone 5

  6. iPad

  7. iPad2
  8. iPad Mini

  9. iPod(第 3、4、5 代)

那么,对于这些 iOS 设备,我该如何管理 xib 及其各自的图像。

对于我的问题,我想说的是,在不同设备上“单击按钮图像”需要多少张图像,以及我如何为它们命名,因为我阅读了@2x、2x@ 等

所以,我要感谢一位专门为我的问题写答案并让我摆脱这种困惑的人。

谢谢

【问题讨论】:

    标签: ios xib


    【解决方案1】:

    这些行直接来自Resource Programming Guide

    MyImage.png - Default version of an image resource.
    MyImage@2x.png - High-resolution version of an image resource for devices with Retina displays.
    MyImage~iphone.png - Version of an image for iPhone and iPod touch.
    MyImage@2x~iphone.png - High-resolution version of an image for iPhone and iPod touch devices with Retina displays.
    

    基本上只有5种尺寸

    1. iPhone/iPod Touch 320x480
    2. 具有 640x960 视网膜显示屏的 iPhone/iPod Touch
    3. iPhone/iPod touch 5th 640x1136
    4. iPad,非 Retina 显示屏 768x1024
    5. 配备 Retina 显示屏的 iPad 1536x2048
    6. iPad mini 768x1024

    对于列表 1,您的 MyImage~iphone.png 将起作用
    对于列表 2 和 3,您的 MyImage@2x~iphone.png 将起作用
    对于列表 4 和 6,您的 MyImage.png 将起作用
    对于列表 5,您的 MyImage.png 将起作用。

    所以你只需要四个图像。

    【讨论】:

    • 您没有仔细阅读问题,其中还提到了xib类型。也请参考一些数据。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-07
    • 1970-01-01
    • 1970-01-01
    • 2011-09-28
    • 2016-10-16
    • 1970-01-01
    相关资源
    最近更新 更多