TTStyledText and ampersand (’&’)

24 Jun
2010

My styled text disappeared sometimes. I tracked down the problem. You’re not allowed to have bare ampersands in the styled text. Replace them with the html-encoded variant and everything works fine.

  // fix styled text for apersand problems
  styledText = [styledText stringByReplacingOccurrencesOfString:@"&" withString:@"&"];

Other than that, TTStyledText is plain awesome, so is the whole three2 framework (extracted from the facebook iPhone App)

Related posts:

  1. NSDateFormatter and +00:00 parsing

Comment Form

top

Switch to our mobile site