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:

enter image description here

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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -