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
This image shows how to do this in storyboards.The Tint color is the checkmark color.
If you are looking for a Swift version:
For example in tableView(_:,cellForRowAtIndexPath:)
cell.tintColor = UIColor.redColor()
UITableViewCell.appearance().tintColor = UIColor.redColor()
You don't have to use your own image, you can simply change it in your view did load with the following code.
[self.tableView setTintColor:[UIColor colorWithRed:250/255.0 green:223/255.0 blue:6/255.0 alpha:1]]
Cheers!
UITableViewCell *cell=(UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:@"CellIdentifier" forIndexPath:indexPath];
cell.tintColor=UIColor.whiteColor;
return cell;
Swift 3.1, iOS 9+
if #available(iOS 9.0, *) {
UIImageView.appearance(whenContainedInInstancesOf: [UITableViewCell.self]).tintColor = UIColor.themeTint //add your color here
} else {
// Fallback on earlier versions
}
Since the iOS SDK has changed since the accepted answer, I thought I'd just update with a new answer.
You can in fact change the color of the checkmark in a UITableViewCell
by adjusting the tintColor
property of the UITableViewCell.
You can also set an appearance proxy for all UITableViewCells so that ALL instances have a specific tint color unless otherwise specified
[[UITableViewCell appearance] setTintColor:[UIColor redColor]];