title: How to properly toggle UITableViewCell's accesoryType on cell selection/deselection?
body: <p>I'm trying to toggle <strong>accesoryType</strong> when a table cell is selected/deselected... the behavior should be: tap -> set accessoryType to <strong>UITableViewCellAccessoryCheckmark</strong> -> tap the cell again -> rollback to <strong>UITableViewCellAccessoryNone</strong> type.
  The implementation in my controller is the following:</p>
  
  <pre><code> - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
  {   
      UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
      [cell setAccessoryType:UITableViewCellAccessoryCheckmark];
  }
  
  - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
      [cell setAccessoryType:UITableViewCellAccessoryNone];
  }
  </code></pre>
  
  <p>...anyway once the style is configured as <strong>UITableViewCellAccessoryCheckmark</strong> I'm unable to restore it back to <strong>UITableViewCellAccessoryNone</strong>!
  I also tried to call:</p>
  
  <pre><code>[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
  </code></pre>
  
  <p>but does not remove the checkmark... what should I do?</p>
  
  <p><strong>EDIT: The implementation is ok, the problem was in the custom UITableViewCell subclass... sorry :P</strong></p>