how to make bold font NSString value?

允我心安 提交于 2019-12-02 03:02:22

the NSString is for store a simple texts without any font formatting.

the UILabel has a font property, you can use it to set the visible text's font on the UI, but the UILabel can work with one format only and the whole text gets the same font and style.


if you really want to use a kind of rich text document, you should create a UIWebView class and you can show any document inside with the standard HTML tags.


UPDATE

the UILabel can store attributed string since iOS6, which gives you a chance to show rich-formatted text in one single UILabel instance, even using various fonts or sizes, etc...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!