hye*_*ung 4 uitableview uilabel custom-cell ios line-spacing
我使用CustomCell
的,而不是UITableViewCell
上UITableView
.
我把两个放UILables
了CustomCell
.
提到这个网站:在这里,但我失败了......
问题:如何控制UILabels的行间距?
ios*_*ist 13
从iOS 6
您开始可以将属性字符串设置为UILabel
.检查以下内容:
NSMutableParagraphStyle *paragrahStyle = [[NSMutableParagraphStyle alloc] init];
[paragrahStyle setLineSpacing:40];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragrahStyle range:NSMakeRange(0, [labelText length])];
cell.label.attributedText = attributedString;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5982 次 |
最近记录: |