UILabel行高设置
2015-12-21 18:03
267 查看
_contentLabel.frame = CGRectMake(8, 136, SCREEN_WIDTH - 16, 1); _contentLabel.numberOfLines = 0; _contentLabel.text = [Collect replaceNull:[_contentDic objectForKey:@"description"]]; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:_contentLabel.text];; NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init]; [paragraphStyle setLineSpacing:5]; [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, _contentLabel.text.length)]; _contentLabel.attributedText = attributedString; [_contentLabel sizeToFit];
相关文章推荐
- 13.利用UITextField制作格式化输入输出的内容
- SpannableStringBuilder的使用方法
- SAP BW QUERY VARIABLES (BW增强变量)
- 12.真机UI调试神器Reveal的使用
- IOS开发之----设置UITableView背景色和选中背景色
- Error: Installation error: INSTALL_FAILED_UID_CHANGED
- Oozie中Hive action配置时的注意事项
- easyui防止重复提交及进度条报错解决: Cannot read property 'onClose' of undefined
- iOS 9: UIStackView入门
- Oozie配置Hue
- 随机排序12宫格的头像展示Demo
- EasyUI dataGrid 翻页时会把之前页选中的记录取消掉
- iOS UISearchController的使用
- UItableView的自适应
- C# 队列(Queue)基础
- 29.Which two statements are true regarding constraints?
- mysql 连接url中useUnicode=true&characterEncoding=UTF-8 的作用
- 11.使用NSUserDefaults存储存储
- CEGUI0.8.4引入到自己工程中
- UIAlertView ios9 开始废弃 使用UIAlertController弹框提示