views:

49

answers:

1

I want to add there text color in UITableView Cell.

I want to show like that in UITableView Cell.

Red, Green , YELLOW

However, following code can work only 1 color.

cell.textLabel.textColor=[UIColor redColor];
cell.textLabel.text=@"4:00 AM , 9:00 AM , 10:00PM ";

I want to show 4:00 AM with red color and 9:00 AM with green color, 10:00 PM with yellow color.

How should I write it ? Can I do like this in UITableView ?

+1  A: 

you will need to create custom cell by customizing the content view of the cell

sample tutorial here

Aaron Saunders
I got it. I'm using UILable and [cell.contentView addSubview:country3Label]; method. Working fine =) Thank
saturngod