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. socket简单理解

    要想理解socket首先得熟悉一下TCP/IP协议族, TCP/IP(Transmission Control Protocol/Internet Protocol)即传输控制协议/网间协议,定义了主 ...

  2. WindowFromPoint -- 获得包括指定点的窗体的句柄

     WindowFromPoint 函数功能: 该函数获得包括指定点的窗体的句柄. 函数原型: HWND WindowFromPoint(POINT Point): 參数: Point:指定一个被检 ...

  3. C++入门学习——模板

    为什么须要模板? 我们已经学过重载(Overloading),对重载函数而言,C++ 通过函数參数(參数个数.參数类型)的正确匹配来调用重载函数.比如.为求两个数的最大值,我们定义 max () 函数 ...

  4. DirectX11 学习笔记7 - 支持自由移动的摄像机

    如今将又一次制定一个camera摄像机.能够自由移动. 比方前进 后退,上游 下潜. 各个方向渲染之类的. 首先设置按键. 这个时候须要在 XWindow.h 里面 bool XWindow::fra ...

  5. ZOJ 3876 May Day Holiday 蔡勒公式

                                                   H - May Day Holiday Description As a university advoc ...

  6. Message: SyntaxError: unterminated string literal

    #Message: SyntaxError: unterminated string literalmytxt = words.replace('\n','').replace('\r','') js ...

  7. Eclipse 工程配置与目录结构及各种文件夹(常用插件)

    .classpath..project 是 Eclipse 工程所必须的文件. OpenExplorer: 该 jar 包的下载地址:samsonw/OpenExplorer 安装配置方法:eclip ...

  8. go语言---for

    go语言---for https://blog.csdn.net/cyk2396/article/details/78873930 执行以下代码,发现无法跳出for循环: func SelectTes ...

  9. BZOJ_1862_[Zjoi2006]GameZ游戏排名系统&&BZOJ_1056_[HAOI2008]排名系统_Splay

    BZOJ_1862_[Zjoi2006]GameZ游戏排名系统&&BZOJ_1056_[HAOI2008]排名系统_Splay Description 排名系统通常要应付三种请求:上传 ...

  10. 【HDU 4547】 CD操作

    [题目链接] 点击打开链接 [算法] 分四种情况讨论 : 1. 当前目录和目标目录是同一目录,不需要变换,答案为0 2. 当前目录是目标目录的祖先,答案为当前目录的深度 - 目标目录的深度 3. 当前 ...