iphone - iOS - Override UITextView Methods? -


i want override method draws text uitextview. correct method override?

update 2016-02-09: answer wrong (and has been since ios 6). can use uitextview setting nsattributedstring attributedtext property instead of setting normal nsstring text property.

relevant newer question: https://stackoverflow.com/a/14231900/458205


original answer

there's no way set different colours different words in uitextview.

there multiple replacements uitextview support rich text editing (listed bellow). if only want give different text different color's in uitextview (like syntax highlighting) easiest thing use uitextview editing coretext overlay displaying coloured text.

https://github.com/squaredtiki/editablecoretextoverlay


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -