简体   繁体   English

将启动屏幕图像与xcode故事板一起使用

[英]Using Launch Screen Images with xcode storyboard

I am trying to create a custom launch screen for ios devices. 我正在尝试为ios设备创建自定义启动屏幕。 I have created a story board called Green Screen and selected this as the launch screen file. 我创建了一个名为Green Screen的故事板,并将其选择为启动屏幕文件。 I have added some images to the LaunchImage cassete in Images.xcassetes , though I have not filled every slot. 我已经添加了一些图片在LaunchImage盒带Images.xcassetes ,虽然我还没有填满每个缝隙。 I have added an Image View box to the Green Screen view, but when when I select that image box and select the image dropdown, I do not see LaunchImage as a selection. 我已经在“ Green Screen视图中添加了一个“ Image View框,但是当我选择该图像框并选择图像下拉列表时,没有看到LaunchImage作为选择。

However, if I create my own cassete, called prototype launch image , then when I go to to the image view, I can select ```prototype launch image``, add it to the image box, and stretch the image to fill the screen. 但是,如果我创建自己的容器,称为prototype launch image ,那么当我进入图像视图时,可以选择“原型启动图像”,将其添加到图像框中,然后拉伸图像以填充图像。屏幕。 However when the launch screen appears on building the app, the image is not centred and there is white space at bottom, so this does not seem to be a viable approach. 但是,在构建应用程序时出现启动屏幕时,图像未居中且底部有空白,因此这似乎不是可行的方法。

How do I add the LaunchImage cassette to this storyboard? 如何将LaunchImage卡带添加到此情节LaunchImage

I am using Xcode 7.2. 我正在使用Xcode 7.2。

Paulw11注释中指出的(请参见上文),您需要选择图像视图,然后适当地设置约束。

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

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