horizontal, vertical

top, left, bottom, right

UIEdgeInsets

margin与padding

Interpreting Values

Values in Auto Layout are always in points. However, the exact meaning of these measurements can vary depending on the attributes involved and the view’s layout direction.

 

Auto Layout Attributes

Value

Notes

Height

Width

The size of the view.

These attributes can be assigned constant values or combined with other Height and Width attributes. These values cannot be negative.

Top

Bottom

Baseline

The values increase as you move down the screen.

These attributes can be combined only with Center Y, Top, Bottom, and Baseline attributes.

Leading

Trailing

The values increase as you move towards the trailing edge. For a left-to-right layout directions, the values increase as you move to the right. For a right-to-left layout direction, the values increase as you move left.

These attributes can be combined only with Leading, Trailing, or Center X attributes.

Left

Right

The values increase as you move to the right.

These attributes can be combined only with Left, Right, and Center X attributes.

Avoid using Left and Right attributes. Use Leading and Trailing instead. This allows the layout to adapt to the view’s reading direction.

By default the reading direction is determined based on the current language set by the user. However, you can override this where necessary. In iOS, set the semanticContentAttribute property on the view holding the constraint (the nearest common ancestor of all views affected by the constraint) to specify whether the content’s layout should be flipped when switching between left-to-right and right-to-left languages.

Center X

Center Y

The interpretation is based on the other attribute in the equation.

Center X can be combined with Center X, Leading, Trailing, Right, and Left attributes.

Center Y can be combined with Center Y, Top, Bottom, and Baseline attributes.

UI布局术语的更多相关文章

  1. Duilib源码分析(五)UI布局—Layout与各子控件

    接下来,继续分析duilib之UI布局Layout,目前提供的布局有:VerticalLayout.HorizontalLayout.TileLayout.TabLayout.ChildLayout分 ...

  2. iOS-屏幕适配-UI布局

    iOS 屏幕适配:autoResizing autoLayout和sizeClass 一.图片解说 -------------------------------------------------- ...

  3. AppleWatch___学习笔记(二)UI布局和UI控件

    1.UI布局 直接开发,你会发现Apple Watch并不支持AutoLayout,WatchKit里有个类叫做WKInterfaceGroup,乍一看像是UIView,但是这货其实是用来布局的.从 ...

  4. iOS开发~UI布局(三)深入理解autolayout

    一.概要 通过对iOS8界面布局的学习和总结,发现autolayout才是主角,autolayout是iOS6引入的新特性,当时还粗浅的学习了下,可是没有真正应用到项目中.随着iOS设备尺寸逐渐碎片化 ...

  5. iOS开发~UI布局(二)storyboard中autolayout和size class的使用详解

    一.概要:前一篇初步的描述了size class的概念,那么实际中如何使用呢,下面两个问题是我们一定会遇到的: 1.Xcode6中增加了size class,在storyboard中如何使用? 2.a ...

  6. iOS开发~UI布局(一)初探Size Class

    随着iOS8系统的发布,一个全新的页面UI布局概念出现,这个新特性将颠覆包括iOS7及之前版本的UI布局方式,这个新特性就是Size Class.Size Class配合Auto Layout可以解决 ...

  7. WPF UI布局之概述

    在线演示:http://v.youku.com/v_show/id_XNzA5NDk2Mjcy.html 清晰版视频+代码下载:http://115.com/lb/5lbeer0m9lad 一.简单介 ...

  8. iOS UI布局调试工具

    查看ios软件的ui布局有三种: 1.DCIntrospect    这种方式是开源的,我从github上clone下来后运行demo,运行遇到了问题:Xcode cannot run using t ...

  9. WPF案例 (六) 动态切换UI布局

    原文:WPF案例 (六) 动态切换UI布局 这个Wpf示例对同一个界面支持以ListView或者CardView的布局方式呈现界面,使用控件ItemsControl绑定数据源,使用DataTempla ...

随机推荐

  1. c++命令提示符窗体下打印指定大小的菱形代码

    c++命令提示符窗体下打印指定大小的菱形代码 VS2010下,新建空项目.加入源文件,将代码粘贴进去就能够了. 通过改maxRows值的大小,能够控制菱形的大小 #include <stdio. ...

  2. js location对象相关命令

    Location.href 返回整个当前url,若对其赋值:location.href="http://www.sina.com.cn"则跳转其urllocation.host 返 ...

  3. 仰视源代码,实现strcmp

    //这是系统库的实现 int strcmp(const char* src, const char* dest) { int rtn = 0; while(!(rtn = *(unsigned cha ...

  4. 操作系统学习笔记:CPU调度

    CPU调度的目的在于提高CPU利用率,不让CPU闲着.CPU是宝贵的资源,如果有一个进程,本来在CPU中运行,忽然因为要使用IO资源,于是转而请求IO,这边CPU挂起,造成就绪队列中的其他进程等待,这 ...

  5. ugc pgc ogc web2.0 mgc

    http://yjy.people.com.cn/n/2014/0120/c245079-24169402.html machine

  6. [Codeforces 425A] Sereja and Swaps

    [题目链接] https://codeforces.com/contest/425/problem/A [算法] 枚举最终序列的左端点和右端点 , 尝试用这段区间中小的数与区间外大的数交换 时间复杂度 ...

  7. PyCharm创建文件时自动添加头文件

    依次找到以下路径: File->settings->Editor->File and Code Templates->Python Script  #!/usr/bin/env ...

  8. Ubuntu12.04安装JDK(jdk-6u45-linux-x64.bin)(转载)

    首先下载jdk-6u45-linux-x64.bin, 如果是32bit系统下载相应的i386即可. 更改文件权限-> chmod a+x jdk-6u45-linux-x64.bin. 创建目 ...

  9. 【WIP_S4】栈

    创建: 2018/01/15 更新: 2018/01/24 更改标题 [[WIP_S3]堆] => [[WIP_S4]堆] 继续添加内容 更新: 2018/05/13 更改标题  [[WIP_S ...

  10. 洛谷P4158 [SCOI2009]粉刷匠

    传送门 设$dp[i][j][k][0/1]$表示在涂点$(i,j)$,涂了$k$次,当前点的颜色是否对,最多能刷对多少个格子 首先换行的时候肯定得多刷一次 然后是如果和前一个格子颜色相同,那么当前点 ...