Hi,
how can i have a UILabel with two different colors for the font. I will have text in two different strings and i want to make text with first string as red and second as green. The length of both the string is variable.
Thanks in advance
Hi,
how can i have a UILabel with two different colors for the font. I will have text in two different strings and i want to make text with first string as red and second as green. The length of both the string is variable.
Thanks in advance
UILabel can only have one color. You either need a more sophisticated element, or - probably easier - just use two separate labels. Use [yourLabel sizeToFit];
and place them accordingly.
I had to do that too in a project. I used this class from another post but it's only for one single line, I don't know if it is enough for you.
iPhone - UILabel containing text with multiple fonts at the same time