简体   繁体   English

如何在 iOS 中将全屏大小的图像设置为启动屏幕?

[英]How to set a full screen size image as a launch screen in iOS?

So I need to set an image to a launch screen, it isn't just an icon with a background color, that most docs describe how to manipulate it.所以我需要为启动屏幕设置一个图像,它不仅仅是一个带有背景颜色的图标,大多数文档都描述了如何操作它。 it is a full size image like this one .这是一张像这样的全尺寸图像。 I want it to look the same on every iOS device (iPhone & iPad).我希望它在每个 iOS 设备(iPhone 和 iPad)上看起来都一样。 But when I add new images set in assets, there are only three images to add, apparently this works perfect when using icon with a background, not a full-screen image.但是当我在资产中添加新图像时,只需要添加三个图像,显然这在使用带有背景的图标而不是全屏图像时非常完美。 I tried to add the images to the launchscreen images set but it doesn't appear under the Image drop-down list in the storyboard.我尝试将图像添加到启动屏幕图像集,但它没有出现在故事​​板的Image下拉列表下。

EDIT编辑

here's how the designer looks with the constraints:这是设计师在约束条件下的外观:

在此处输入图片说明

the result on iPhone X (the image is for demonstration only): iPhone X 上的结果(图片仅供演示):

在此处输入图片说明

The original launch screen doesn't look fit at all, given that its size is not available among the 3 images原始启动屏幕看起来根本不合适,因为它的大小在 3 个图像中不可用

In my case it works.就我而言,它有效。 I had the task of placing the image in full screen.Do not forget to remove Safe Area in View.我的任务是将图像全屏放置。不要忘记在视图中删除安全区域。

在此处输入图片说明

The screenshot share above don't see the X and Y constraints.上面的截图分享没有看到 X 和 Y 约束。 This is could be of the issue.这可能是问题所在。 The width, Height and center constraints are provided.提供了宽度、高度和中心约束。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM