ios - Colour of a substring in a string of text view -


i have text view like:

    uitextview statictxt = [[uitextview alloc]initwithframe:cgrectmake(10, 80, 300, 400)];         statictxt.backgroundcolor = [uicolor clearcolor];         statictxt.text = @"this textview";         statictxt.textcolor = [uicolor whitecolor]; [self.view addsubview:statictxt]; 

now want text "textview" should in different colour. how can this? thanks!!

you need create attributed text string, described in answer:

underline text in uitextview


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -