简体   繁体   中英

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.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. 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.

You could click the More options... top right of storyboard, and set left/right/top/bottom distance for each edge.

在此处输入图像描述

Then select Presets for All Sides

在此处输入图像描述

Then it will fill all sizes of screen.

=================================Update==================================

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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