iphone - Formatting UITableViewCell -
i have uitableview cell , need set it's label "sometext (number)". can that, need "(number)" grayish, how can that? here's image might make trying ask clearer:
i need 12, 24, 48, 96 gray in picture. thanks.
you need 2 uilabels, you'll have the
label1.textcolor = [uicolor blackcolor]; label2.textcolor = [uicolor graycolor];
now that's obvious part, when set text on label1 you'll have
label1.text = ...; cgsize newsize = [label1.text sizewithfont:label1.font constrainttosize:cgsizemake(320, label1.frame.size.height)]; label2.frame = cgrectmake(label1.frame.origin.x + newsize.width + 5., label2.frame.origin.y, label2.frame.size.width, label2.frame.size.height); stay close they're 1 label.
Comments
Post a Comment