Thursday, July 8, 2010

Changing UITableViewCell text colors

This is a really easy but, but may not be immediately apparent. Personally, I first tried changing the color of the cell directly, then tried changing the color of the text within the cells. What you actually need to do is change the textColor property of the UILabel's that are inside of the cell. For example, if you want to change the color of the textLabel, you would use:

cell.textLabel.textColor = [UIColor lightGrayColor];

The same goes for the detail label if you are using that type of cell:

cell.detailTextLabel.textColor = [UIColor blackColor];

No comments:

Post a Comment