【问题标题】:Incorrect Assets image loads in iPadiPad 中的资产图像加载不正确
【发布时间】:2019-07-29 14:03:29
【问题描述】:

我在 Assets.xcassets 中添加了一个三维的图像

back.png with size 18 x 14 pixels
back@2x.png with size 36 x 28 pixels
back@3x.png with size 54 x 42 pixels

我已在属性检查器中将 UIButton 的图像属性设置为“返回”。在 iPad Pro(12.9 英寸第 3 代)上运行应用程序时,Xcode 应自动填充 back@3x.png 作为该 UIButton 上的图像。但是,它在 UIButton 上加载最低分辨率的图像,即 back.png。

请协助,因为我需要为 iPad 加载更高像素的图像。

【问题讨论】:

    标签: ios uiimage assets dimensions


    【解决方案1】:

    来自Apple guidelines 的图像大小和分辨率,新 iPad Pro(12.9 第 3 代)使用 @2x。

    【讨论】:

      猜你喜欢
      • 2013-05-28
      • 2021-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多