how can I set substring of a NSString as bold in UILabel [duplicate]

久未见 提交于 2019-12-11 04:22:23

问题


Possible Duplicate:
Bold & Non-Bold Text In A Single UILabel?

I want to know that how can I set substring of a NSString as bold in UILabel ?

for example : I have a string in UILabel say,

*Apply to a bill of $16 or more 

and I want to make " $16 " bold .

Thanks....


回答1:


Simply use TTTAttributedLabel It's perfect for your purpose.




回答2:


You could also UIWebView for displaying rich content in iPhone.

Display Rich Text Using a UIWebView




回答3:


You can't. iOS 4 does not support rich text in UILabel yet.

Try some of the answers in this thread: UILabel with basic rich text support



来源:https://stackoverflow.com/questions/7385892/how-can-i-set-substring-of-a-nsstring-as-bold-in-uilabel

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