Reputation: 117
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 ?
Upvotes: 1
Views: 170
Reputation: 89559
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).
Upvotes: 4
Reputation: 15442
You can't do that with a UILabel.
One option is to use a UIWebView and stick HTML inside it...
Upvotes: 0