_infoLabel = [UILabel createNormalLabelWithTitle:@"设置了下面属性就可以换行了"];
// 限制宽
_infoLabel.preferredMaxLayoutWidth = ScreenWidth - 40*UIRate;
[_infoLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
_infoLabel.numberOfLines = 0;
[holdView addSubview:_infoLabel];
[_infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(holdView);
}];
Masonry布局UILabel换行
最新推荐文章于 2024-11-15 23:16:28 发布
博客围绕Masonry布局UILabel换行展开,虽未给出具体内容,但核心聚焦于此技术操作,在移动开发中,Masonry是常用布局工具,UILabel换行设置有其特定方法和要点。
1万+

被折叠的 条评论
为什么被折叠?



