最佳答案
是的,很多人都在谈论 iPhone/iPad 中的 Rich Text,很多人都知道 NSAttributedString
。
但是如何使用 NSAttributedString
呢? 我搜索了很长时间,没有提取到这方面的线索。
我知道如何设置一个 NSAttributedString
,那么我应该怎么做才能在 iPhone/iPad 上显示富文本的文本?
官方文件说它应该和 CoreText.Framework
一起使用,这是什么意思?
有没有这么简单的方法?
NSAttributedString *str;
.....
UILabel *label;
label.attributedString = str;