I need to create a checklist using a UITableView with the accessoryView as a custom check box and tick, what would be the best (fast & efficient) way to do this?
Also what would be the best way to tick/untick it from within accessoryButtonTappedForRowWithIndexPath and store/retrieve the current state of the row (checked/unchecked) for example:
-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
if (something==isChecked) {
change accessoryView to unchecked
// do stuff
} else {
change accessoryView to unchecked
// do stuff
}
}
Thanks!
I have just found Apple has created an example of exactly this! Here is a link for anybody looking for the same thing:
http://developer.apple.com/iphone/library/samplecode/Accessory/Introduction/Intro.html