LaunchScreen.storyboard 的背景图片
Background image for LaunchScreen.storyboard
我正在使用故事板作为启动屏幕。
它具有全尺寸 UIImageView
艺术作品和在其上呈现的语言相关的 UILabel。
我确实有所有可能的 iPhone 屏幕尺寸的 .png 文件(iPad 不需要)。
当我使用相同的图像 iPhone 4 秒和 iPhone 5 秒时,艺术品包含一个看起来扭曲的圆圈。
方法 1
在 LaunchScreen.storyboard 中,我为所有 iPhone 添加一个 UIImageView
并使用在 Assets.xcassets
.
中定义的图像集
当我执行此操作时,图像集的image@2x 用于iPhone 4 秒和iPhone 5 5 秒。两者之一看起来很糟糕,因为 iPhone 4s 和 5 的高度不同。
我不知道我可以在故事板中使用大小 类 来区分 iPhone 4s 和 iPhone 5。或者我可以吗?
方法二
在 Assets.xcassets 中创建一个启动图像集,它可以容纳所有必要的图像尺寸。
我无法 select 将此启动图像设置为 UIImageView
作为图像。
问题
在 LaunchScreen.storyboard 中的全尺寸 UIImageView
:如何为
显示不同的 png
- iPhone 4 + 4s 640 x 960 像素
- iPhone 5 + 5s 640 x 1136 像素
- iPhone 6 + 6s 750 x 1334 像素
- iPhone 6 plus + 6s plus 1242 x 2208 像素(纵向和横向)
主要问题出现在区分4+4s和5+5s
a circle that looks distorted when I use the same image for iPhone 4s and iPhone 5.
问题出在图像视图的 内容模式 上。使用不会拉伸图像超出其纵横比的内容模式。
我正在使用故事板作为启动屏幕。
它具有全尺寸 UIImageView
艺术作品和在其上呈现的语言相关的 UILabel。
我确实有所有可能的 iPhone 屏幕尺寸的 .png 文件(iPad 不需要)。
当我使用相同的图像 iPhone 4 秒和 iPhone 5 秒时,艺术品包含一个看起来扭曲的圆圈。
方法 1
在 LaunchScreen.storyboard 中,我为所有 iPhone 添加一个 UIImageView
并使用在 Assets.xcassets
.
当我执行此操作时,图像集的image@2x 用于iPhone 4 秒和iPhone 5 5 秒。两者之一看起来很糟糕,因为 iPhone 4s 和 5 的高度不同。
我不知道我可以在故事板中使用大小 类 来区分 iPhone 4s 和 iPhone 5。或者我可以吗?
方法二
在 Assets.xcassets 中创建一个启动图像集,它可以容纳所有必要的图像尺寸。
我无法 select 将此启动图像设置为 UIImageView
作为图像。
问题
在 LaunchScreen.storyboard 中的全尺寸 UIImageView
:如何为
- iPhone 4 + 4s 640 x 960 像素
- iPhone 5 + 5s 640 x 1136 像素
- iPhone 6 + 6s 750 x 1334 像素
- iPhone 6 plus + 6s plus 1242 x 2208 像素(纵向和横向)
主要问题出现在区分4+4s和5+5s
a circle that looks distorted when I use the same image for iPhone 4s and iPhone 5.
问题出在图像视图的 内容模式 上。使用不会拉伸图像超出其纵横比的内容模式。