I am writing following line to put chech mark.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
customersListCell.accessoryType = UITableViewCellAccessoryCheckmark;
}
But, if i select a row, checkmark is appearing on some other row. And if i scroll the able checkmark is disappearing.
Well you should first make sure that you are applying the checkmark to the correct cell:
Now you need to realize that iOS by default reuses the cells in the table – so when one cell gets dragged of the screen, it may be used to show another’s cell content.
You must take this behavior into account when designing your cellForRowAtIndexPath: method.
(basically – check if the cell should have the checkmark and add it to the cell, and CLEAR it if it should not have one).