我在父视图中添加了4个视图,我给它们设置了以下约束
同父宽度相等
固定高度70
1视图之间的垂直距离
父视图的中心x
现在标签中的文本可以增长,不是static.As of Now,标签内的文本显示为垂直中心,所以我添加了下面的代码,使文本对齐标签的顶部,而不是显示在标签的中间。
//Calculate the expected size based on the font and linebreak mode of your label
// FLT_MAX here simply means no constraint in height
CGSize maximu