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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -