
因为在使用 NSAttributedString 的过程中感觉非常的不方便,所以一年前写了这么一个框架 Typeset 来快速生成 NSAttributedString

使用如下的语法
@"Hello'.red.fontSize(20);
同样也支持对 UILabel 设置样式, 可以在 typesetBlock 中对字符串预先进行匹配,
如下:如果出现了 @"type" 就会把 @"type" 变成紫色,出现了 @"set" 就会变为蓝色
label.typesetBlock = TSBlock(fontSize(40)
.match(@"type").purple
.match(@"set").blue);
label.text = @"Hello typeset, hello.";
觉得有用的朋友可以点个 star https://github.com/Draveness/Typeset