其他分享
首页 > 其他分享> > iOS并列label抗压缩、抗拉伸

iOS并列label抗压缩、抗拉伸

作者:互联网

iOS并列label抗压缩、抗拉伸

// 抗被拉伸
[self.label setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
// 抗被压缩
[self.label setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];

标签:拉伸,UILayoutPriorityRequired,forAxis,iOS,UILayoutConstraintAxisHorizontal,label
来源: https://blog.csdn.net/qq_15289761/article/details/120371202