https://github.com/easycodingTop/EALayoutLiteForOC
QQ群:454686295
====================================================
这一地讲如何自动计算高度
如何自动计算容器高度:
{
"class":"UIView",
"backgroundColor":"redColor",
"layout":{"s":"l=10,m,w,h"},
"addSubview":[
{
"class":"UIImageView",
"image":"image/testicon.jpg",
"layout":{"s":"l=10,r=10,t=20,w=80,h=80","tag":1}
},
{
"class":"UILabel",
"textColor":"blackColor",
"font":18,
"text":"这里文字可能是多行,自动计算高度",
"numberOfLines":0,
"layout":{"s":[
{"s":"l=10,r=10,b=10"},
{"s":"t=5","asstag":1}
]}
}
]
}
外层layout {"s":"l=10,m,w,h"}, 这里的w, h 当然与 w=0,h=0是两回事。
敬请关注下一节:
====================================================
https://github.com/easycodingTop/EALayoutLiteForOC
QQ群:454686295
====================================================