As i understood from Apple docs attributedText property of UITextView:
This property is nil by default. Assigning a new value to this property also replaces the value of the text property with the same string data, albeit without any formatting information. In addition, assigning a new a value updates the values in the font, textColor, and textAlignment properties so that they reflect the style information starting at location 0 in the attributed string.
Therefore i cannot add an attributedString by code with multiple Attributes at different locations.
Can someone please help me create the following effect by code in iOS6? This is possible using nib files and by changing range attributes for text parts in UITextView but i cant seem to reproduce the effect by code.
<'font systemFontOfSize=18>Desired<'/font> effect <'textColor = [UIColor redColor]> to be written b<'/textColor>y code.
Suppose the tags correspond to attributes.
P.S. I don't want to use CATextLayers since i am trying to use the AutoLayout feature with the UITextView.