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 164 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
- 88,797
- 17
- 166
- 215
0
You can't do that with a UILabel.
One option is to use a UIWebView and stick HTML inside it...

tarmes
- 15,366
- 10
- 53
- 87