RichText 效果 特点1.按照需要调节部分字体的颜色2.调节段落的行间距,字间距 源码github:https://github.com/makingitbest/RichText 细节1.富文本的设置常用的有以下几种 2.段落样式的设置 ...
RichText
效果
特点
1.按照需要调节部分字体的颜色
2.调节段落的行间距,字间距
源码
github:https://github.com/makingitbest/RichText
细节
1.富文本的设置常用的有以下几种
2.段落样式的设置
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new]; //初始化
style.paragraphSpacing = 20; // 段间距
style.lineSpacing = 2; // 行间距
style.firstLineHeadIndent = 26.f; // 段落开头的缩进,按字体大小,缩进它的两倍
[string addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, text.length)];
原标题:RichText
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。