iPhone colorize UILabel substrings -


I am parsing a Twitter RSS feed, and I just need to show tweets, so I do not need MGTwitterEngine . I have already set it up, so I can see the tweet altogether, the only thing I want to color the hashtag and url.

So I have to set the string in different substrings, coloring the hashtag and glue together in the url and various iillablocks

Is this an easy way to accomplish this? In short, I need some parts of a string that are different than others.

This question should answer your question:

Two Use the UILabel IBOutlets, each with a different format (font / color / etc), as you want .. Depending on the end of the previous text, go from one to the other. You can get it through size: Fold: Wide: Linebreaker MODED:

Alternatively, you can make the UILB sub-section, and drag the text itself into the draw. If you do this in this way, just add an example variable to tell you how many strings are in a format, and drag the rest into another.


Comments