开发者

iphone uitableviewcell - mulitiple colors in the same cell textLabel?

cell.textLabel.text = [NSString stringWithFormat:@"your name: %@", you开发者_Python百科rName];

I need yourName to appear in red (while "your name" stays the default black color). Possible? How?


You will need to create 2 UILabels, one containing the 'your name' and the second UILabel has the variable. The first has a textcolour of black and the second is red

Have a look here for creating custom UITableViewCells

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜