2016年1月12日

摘要: 在实际开发中,有时候需要在一个Label内,同时存在不同的字体/颜色/字体大小,我们可以称这种文本叫『富文本』,可以通过设置Label的属性字符串来达到要求。 基本思路: (NSMutableAttributedString *)attributedString = [[NSMutableA... 阅读全文
posted @ 2016-01-12 11:11 Wilson_CYS 阅读(1080) 评论(0) 推荐(0) 编辑
摘要: UITableView --> UIScrollView --> UIView --> UIResponder --> NSObjectNSMutableAttributedString ---> NSAttributedString 阅读全文
posted @ 2016-01-12 10:52 Wilson_CYS 阅读(126) 评论(0) 推荐(0) 编辑
摘要: UILabel设置属性字符串根据字体自动调整宽度粗体、斜体根据文本自适应高度/宽度1 UILabel *lable;2 lable.attributedText; //设置属性字符串;3 lable.adjustsFontSizeToFitWidth;//根据字体大小自动调整... 阅读全文
posted @ 2016-01-12 10:39 Wilson_CYS 阅读(422) 评论(0) 推荐(0) 编辑

导航