Search code examples
objective-ciosmacoscore-text

How to change color of a word in UITextView?


Is it possible to change UITextView`s color in particular range or particular word? If a word appear more than once in a view then change the color of that word.


Solution

  • I solve the problem. I created subclass of UILable and UITextView used core text (CATextLayer) as a layer on label/textview and NSAttributedString will store all the information about the font and color