ios - How to format some text as bold within a UILabel? -


this question has answer here:

i have ios uilabel needs of text normal , of text bold. bold text supposed link part of app, now, i'm reacting tapping on entire label. how can format of text bold?

use attributedtext property:

nsmutableattributedstring *text = [[nsmutableattributedstring alloc] initwithstring:@"this test."]; [text addattribute:nsfontattributename           value:[uifont boldsystemfontofsize:12]           range:nsmakerange(0, 4)]; label.attributedtext = text; 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -