ios - how to highlight selected text/string in iphone -


i have string 'expert sales manager' cell title , want highlight 'sales' in cell title in iphone.
please suggest me way doing so.

you can use nsmutableattributedstring

nsstring *infostring=@"this example of attributed string"; nsmutableattributedstring *attstring=[[nsmutableattributedstring alloc] initwithstring:infostring]; nsinteger _stringlength=[infostring length];  uicolor *_black=[uicolor blackcolor]; uifont *font=[uifont fontwithname:@"helvetica-bold" size:30.0f]; [attstring addattribute:nsfontattributename value:font range:nsmakerange(0, _stringlength)]; [attstring addattribute:nsforegroundcolorattributename value:_black range:nsmakerange(0, _stringlength)]; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -