[XCode] Frame Rectangle 和 Alignment Rectangle 的区别
2015-12-04 10:10
302 查看
参考:http://stackoverflow.com/questions/28152533/difference-between-frame-rectangle-and-alignment-rectangle
如上图,XCode中编辑界面元素,“Size Inspector”中的 View -> Show 可以有两种选择:Frame Rectangle 和 Alignment Rectangle。
根据 http://stackoverflow.com/questions/28152533/difference-between-frame-rectangle-and-alignment-rectangle 介绍,区别大致如下:
一个UI元素的区域有两种:可见区域、Frame区域。以上图的button为例,一个button的可见区域就是那个左右圆角的矩形,而这个button的 Frame区域 通常情况下会比 可见区域 大,如上图,这个button的 Frame区域 可能就是在可见区域外部的一个矩形包围盒。
类似的,Frame Rectangle 指的就是外围包围盒的位置和尺寸,Alignment Rectangle 是和 UI 元素的可见区域相关的。此外,XCode 的 Auto Layout 是通过 Alignment Rectangle 而不是 Frame Rectangle 来实现的。如上图,右对齐的虚线是和这个button的可见区域的右边缘对齐的。
如上图,XCode中编辑界面元素,“Size Inspector”中的 View -> Show 可以有两种选择:Frame Rectangle 和 Alignment Rectangle。
根据 http://stackoverflow.com/questions/28152533/difference-between-frame-rectangle-and-alignment-rectangle 介绍,区别大致如下:
一个UI元素的区域有两种:可见区域、Frame区域。以上图的button为例,一个button的可见区域就是那个左右圆角的矩形,而这个button的 Frame区域 通常情况下会比 可见区域 大,如上图,这个button的 Frame区域 可能就是在可见区域外部的一个矩形包围盒。
类似的,Frame Rectangle 指的就是外围包围盒的位置和尺寸,Alignment Rectangle 是和 UI 元素的可见区域相关的。此外,XCode 的 Auto Layout 是通过 Alignment Rectangle 而不是 Frame Rectangle 来实现的。如上图,右对齐的虚线是和这个button的可见区域的右边缘对齐的。
相关文章推荐
- [OpenCV]拓展图像边界
- Open edX 简单查错
- oracle中connect by prior用法,实战解决日期分解问题
- GBK 和 UTF8 转码
- [LeetCode]97. Reorder List链表重排序
- JAVABEAN必须继承序列化借口的作用
- Android编程实现PendingIntent控制多个闹钟的方法
- (3)websocket实现单聊和群聊
- setup_docker_network.sh
- '调用K3组件反审核单据
- openstack 平台搭建
- 使用SQL如何把用逗号等字符隔开的字符串转换成列表
- oracle客户端NLS_LANG的设置
- android(1)(四种点击事件)
- CGAL计算几何库配置步骤
- Java学习笔记(十三):为什么要使用单例模式
- AngularJS与RequireJS集成方案
- linux awk命令详解(一) awk语法 awk运算 awk数组
- 解决XCode7.1 上无法安装 Alcatraz PackageManager
- 普通PC安装MAC