I’d like to replace the default checkmark image that is shown when a UITableViewCell’s accessory is set to: UITableViewCellAccessoryCheckmark.
So I’d still like to write:
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
But I’d like my own image to be shown rather than the default.
Any help is much appreciated.
Method-1:
I think you can use
Suppose you have a UIButton with checkmark image.
On
cellForRowAtIndexPath:checkButtonTapped:event: Method:
accessoryButtonTappedForRowWithIndexPath: Method
I have taken above code from this link:
Implement a Custom Accessory View For UITableView in iPhone
Method-2:
Also there is a way to make it using custom tableView cell.
I think you have to make a custom cell and add an imageView on right hand side of the cell.
This imageView will then hold the image you want.
On didSelectRowAtRowAtIndexPath: you can add the image and remove based on number of taps.
Do let me know if you want more help.
Hope this helps.