Masonry Label的宽度自适应

2017-06-27  本文已影响0人  H了M

1.宽度不够时

[_label1setContentCompressionResistancePriority:UILayoutPriorityRequiredforAxis:UILayoutConstraintAxisHorizontal];

2.宽度够时

[labelsetContentHuggingPriority:UILayoutPriorityRequiredforAxis:UILayoutConstraintAxisHorizontal];

上一篇下一篇

猜你喜欢

热点阅读