how to do the formatting in a UILabel ? for exemple , if i want to make this , Connected as Keving G , "connected as" and "kevin g" have différents colors and size . Should i use 2 UIlabel ?
Asked
Active
Viewed 159 times
1
-
1Take a look here: https://github.com/wader/ios-misc/tree/master/CoreTextLabel maybe could helps you. – Mat Nov 29 '11 at 11:54
4 Answers
4
There's another potential solution, but these might be too complicated for your purposes.
You can use a open source solution like OHAttributedLabel (which uses a NSAttributedString) or a CATextLayer which takes a NSAttributedString as well.
I got these answers from this related question (which includes sample code for OHAttributedLabel).
Community
- 1
- 1
Michael Dautermann
- 87,822
- 17
- 159
- 205
0
You can't do that with a UILabel.
One option is to use a UIWebView and stick HTML inside it...
tarmes
- 15,258
- 8
- 52
- 86