简体   繁体   English

Xamarin.iOS - 在 storyboard 中自动调整图像以填充屏幕

[英]Xamarin.iOS - autosize image in storyboard to fill screen

I'm not sure if this question is asked before, but I couldn't find the answer to my specific problem.我不确定以前是否有人问过这个问题,但我找不到我的具体问题的答案。

I have a Xamarin.iOS storyboard (in Visual Studio for Windows) and I want the image in this storyboard to fill the screen for every screen.我有一个 Xamarin.iOS storyboard (在每个 Windows 的 Visual Studio 中),我希望这个 ZCD9F90C00700D 屏幕中的图像填充屏幕I have no idea how to do that, so I first simply tried to set four constraints (top, bottom, left, right) to 0 and see what happens.我不知道该怎么做,所以我首先尝试将四个约束(上、下、左、右)设置为 0,然后看看会发生什么。 This didn't work:这没有用:

在此处输入图像描述

在此处输入图像描述

It seems a bit too red and I'm guessing this is not good.它似乎有点太红了,我猜这不好。

Does anyone know how to make sure this image is filling the screen for all screens?有谁知道如何确保此图像填充所有屏幕的屏幕? (thus full screen) (因此全屏)

UPDATE: request since something is wrong (see comments).更新:请求,因为有问题(见评论)。

The image does not appear correctly on the screen (a bit set to the right, so the splash screen is not centered).图像在屏幕上显示不正确(有点设置在右侧,因此初始屏幕未居中)。 This is my current input:这是我当前的输入:

在此处输入图像描述

The image is set to ScaleToFill.图像设置为 ScaleToFill。

You could click the More options... top right of storyboard, and set left/right/top/bottom distance for each edge.您可以单击 storyboard 右上角的更多选项... ,并为每个边缘设置左/右/上/下距离。

在此处输入图像描述

Then select Presets for All Sides然后 select预置所有面

在此处输入图像描述

Then it will fill all sizes of screen.然后它将填充所有尺寸的屏幕。

=================================Update================================== ==================================更新================ ===================

在此处输入图像描述

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

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