To run the example project, clone the repo, and run pod install
from the Example directory first.
Eelay is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Eelay"
zhuxietong, zhuxietong@me.com
Eelay is available under the MIT license. See the LICENSE file for more info.
26行 对view
视图对象的子视图进行布局
28行 将back
添加到view
中并添加以下布局束
- 设置
back
top 到view
top距离为20- 设置
back
left到view
left距离为20- 设置
back
bottom到view
bottom距离为-20- 设置
back
right 到view
right距离为-20
29行 将head
添加到view
中并添加以下布局束
- 设置
head
width 为 100- 设置
head
height 为 100- 设置
head
top到view
top 距离为80- 设置
head
centerX 到view
centerX距离为0
30行 将name
添加到view
中并添加以下布局束
- 设置
name
width 小于等于 200- 设置
name
height 为 30- 设置
name
centerX 到view
centerX 距离为-20- 设置
name
top 到head
bottom 距离为30
31行 将age
添加到view
中并添加以下布局束
- 设置
age
left 到name
right 距离为10- 设置
age
centerX 与name
centerY对齐
32行 将content
添加到view
中并添加以下布局束
- 设置
content
height 大于等于200,该布局束的优先级为1000- 设置
content
left 相对于view
left 距离为30- 设置
content
bottom 相对于view
bottom 距离为-30 ,该布局束的优先级为500- 设置
content
right 相对于view
right 距离为-30- 设置
content
top 与name
bottom 距离为40
将一个视图(label对象)的布局信息放在一个**[Any]**对象中,
[label,]
[label,200],
该值处理时转换成[String:Double]类型,类型中包含优先级, 值,大于小于信息;(注:其它的布局约束中,设置的值,中间处理过程也是转换成[String:Double]类型)
[label,200,"50"],
该值处理时转换成[String:String]类型,类型中包含优先级, 值,大于小于信息
[label,200,"50",[ee.T.L]],
[ee.T.L]
中包含top, left 的对齐方式,此时表示lable 与lable父视图的top,left对齐;
[ee.T.L,[20,30]]
表示top,left 对齐的偏移量 分别是20,30;
[anther_view,ee.T.L,[20,30]]
,当第一个对象为视图类型的时候,label 的设置布局束是相对于该视图进行设置,否则的话就是想对于父视图进行设置的easy map 对应信息NSLayoutAttribute. ee.T —> NSLayoutAttribute.top, ee.L —> NSLayoutAttribute.left