Visual Studio Xamarin iOS启动屏幕故事板布局 [英] Visual studio Xamarin iOS launchscreen storyboard layout

查看:102
本文介绍了Visual Studio Xamarin iOS启动屏幕故事板布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法全神贯注于Visual Studio中的情节提要编辑器的工作方式.我的设计部门为我提供了一些图像用作我们的应用程序的启动屏幕,我将它们放置在launchscreen.storyboard中并正确对齐.但是,整个编辑器对我来说没有任何意义.我一直在阅读有关约束的信息,并在Visual Studio中对其进行了尝试,但是系统似乎并没有执行我想要的任何操作.它总是在做超出我期望的事情.

I can't seem to wrap my head around how the storyboard editor in Visual Studio works. My design department has provided me with some images to be used as the splash screen of our App, and I'm to put them in the launchscreen.storyboard and align the correctly. However, the whole editor doesn't make any sense to me. I've been reading about constraints, and trying them out in Visual Studio, but the system doesn't seem to do anything I want. It's always doing something else than I was expecting.

启动屏幕包含三个图像.第一个是背景,它应该填满整个屏幕.第二个是页脚.它应该显示在屏幕的底部,左右,底部的边距固定,以正确的宽高比显示它.第三个是应该以固定的左右边距显示在中间的图标.我该怎么办?有谁能指出我的榜样吗?还是谁可以向我解释所需的约束条件?

The launchscreen consists of three images. The first is a background, it should fill the entire screen. The second one is a footer. It should be shown at the bottom of the screen, with fixed margins to the left, right and bottom, showing it in the correct aspect ratio. The third is an icon that should be shown in the center with a fixed left and right margin. How can I go about this? Is there anyone who can point me to an example? Or who can explain the required constraints to me?

推荐答案

您应该知道,控件上设置的所有约束条件都决定了控件的位置(x,y)和大小(width,height).

You should be aware of that all the constraints set on the control determine its position(x,y) and size(width,height).

fill the entire screen

顶部,前导,尾随,底边距将超级观看次数的等值线设为0.

top ,leading, trailing,bottom margin to superview euqals to 0.

在屏幕底部,左右,底部的边距固定,以正确的宽高比显示

at the bottom of the screen, with fixed margins to the left, right and bottom, showing it in the correct aspect ratio

修复了开头,结尾,超级视图的底边距以及宽高比的问题.

fixed leading , trailing , bottom margin to superview , and aspect ratio plus.

以固定的左右边距显示在中间

shown in the center with a fixed left and right margin

这里约束不够,图像不知道其高度,我们应该在高度上设置一个固定的高度或长宽比.

Here the constraints are insufficient, the image can't know its height, we should set a fixed height or aspect ratio on height.

单击高度手柄和长宽比

click the height handle and aspect ratio

Layout菜单中双击高度限制.

double click the height constraint in Layout menu.

修改乘数.

这篇关于Visual Studio Xamarin iOS启动屏幕故事板布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆