UILabel行数间隔
2016-06-20 11:39
465 查看
//调整行间距
NSMutableAttributedString *attributedString = [[NSMutableAttributedStringalloc]
initWithString:_contentLb.text];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStylealloc]
init];
[paragraphStyle setLineSpacing:6];
[attributedString addAttribute:NSParagraphStyleAttributeNamevalue:paragraphStyle
range:NSMakeRange(0, [_contentLb.textlength])];
_contentLb.attributedText = attributedString;
NSMutableAttributedString *attributedString = [[NSMutableAttributedStringalloc]
initWithString:_contentLb.text];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStylealloc]
init];
[paragraphStyle setLineSpacing:6];
[attributedString addAttribute:NSParagraphStyleAttributeNamevalue:paragraphStyle
range:NSMakeRange(0, [_contentLb.textlength])];
_contentLb.attributedText = attributedString;
相关文章推荐
- 错误 bpbrm(PID=7552) 从客户端 - Script exited with status = 1 <the requested operat
- UIScrollViewDelegate
- UIScrollView 性能优化 - view转为Image
- 357. Count Numbers with Unique Digits
- Android酷炫实用的开源框架(UI框架)
- return true 的应用(判断三个块相连)和块的存储
- request 访问路径地址
- iOS解决UIcollectionView添加手势后不响应其cell的问题
- iOS流布局UICollectionView系列一——初识与简单使用UICollectionView
- RESTEasy:@FormParam、@PathParam、@QueryParam、@HeaderParam、@CookieParam、@MatrixParam说明
- LinkedBlockingQueue 与ConcurrentLinkedQueue队列的不同与同
- iOS-UIButton 全面解析
- UIStackView的演练-学习
- 网摘:漫谈law、equity、act、statute、code、bill等法律英语词汇
- APIs — A Strategy Guide】系列之二 把API作为你的商业策略
- leetcode_357 Count Numbers with Unique Digits
- quagga-mtr——Multi-Topology Routing support for quagga routing suite
- uiautomator中踩过的坑
- PBS命令相关
- JSP内置对象——request 及其响应get和post请求的实例