Ugly code and app to show some attributedtext features. Apple has this: Attributed String Programming Guide