Nov 19, 2010

(iPhone)How to display different color text

There are several ways to display different color text in iOS device.
  1. Use multiple UILabel and each contains different font style.
  2. Use HTML tag and UIWebView.
  3. Use NSMutableAttributedString, this classe is added in iOS from 3.2, it needs Core Text to render rich text on the view. AliSoftware created a useful classe UIAttributedLabel which is an UILabel's subclass and supports NSMutableAttributedString. Check AliSoftware's github for more information.

No comments: