uicolor - iOS attributedText for 5.1 -


this question has answer here:

how can make in ios 5.1 -

 nsstring *statusstrcolored = [nsstring stringwithformat:@"%@ (%@)", statusstr, paymentstatusstr];             nslog(@"stoka = %@", statusstrcolored);             //nsarray *components = [statusstrcolored componentsseparatedbystring:@" "];             nsrange greenrange = [statusstrcolored rangeofstring:statusstr];             nsrange redrange = [statusstrcolored rangeofstring:paymentstatusstr];             nsmutableattributedstring *attrstring1 = [[nsmutableattributedstring alloc] initwithstring:statusstrcolored];              [attrstring1 beginediting];             [attrstring1 addattribute: (nsstring*)kctforegroundcolorattributename                                value:(id)[[uicolor greencolor] cgcolor]                                range:greenrange];              [attrstring1 addattribute: (nsstring*)kctforegroundcolorattributename                                value:(id)[[uicolor redcolor] cgcolor]                                range:redrange];              [attrstring1 endediting];             cell.textlabel.attributedtext = attrstring1; 

in ios 6 ok, in 5.1 ... not available(((

and have error on code -

 cell.textlabel.attributedtext = attrstring1; 

may have analog in ios 5.1?

look @ using dtcoretext backwards compatible attributed string , htmlish handling.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -