Search code examples
objective-cuitableviewuicolor

Change color on checkmark in UITableView


Could someone be so kind to show me how to change the color on the checkmark in UITableView?

I have searched but don't seem to get it to work.

Cheers


Solution

  • Apple doesn't provide a public way to change the color of the checkmark so you'll have to do it with an image.

    This is very simple, just set the accesoryView property of the cell to a UIImageView containing a checkmark of the correct color.

    It'll look like this:

    UIImageView *checkmark = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"coloredCheckmark.png"]];
    cell.accessoryView = checkmark;
    [checkmark release];
    

    Enjoy!