title: How to uncheck all rows using UITableViewCellAccessoryCheckmark
body: <p>I've got a <code>UITableView</code> with each row containing a checkbox using <code>UITableViewCellAccessoryCheckmark</code>. I can't figure out how to uncheck all the checkboxes using the <code>didSelectRowAtIndexPath</code> method.</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {  
  
      UITableViewCell *oldCell;
  
      int count = [self.myTableRowNamesArray count];
  
      for (NSUInteger i = 0; i &lt; count; ++i) {                                
          // Uncheck all checkboxes
          // OF COURSE THIS DOESN'T WORK
          // BECAUSE i IS AN INTEGER AND INDEXPATH IS A POINTER
          FOO: oldCell = [myTableView cellForRowAtIndexPath:(int)i];
          // GOOD CODE:
          oldCell = [penanceOptionsTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
          oldCell.accessoryType = UITableViewCellAccessoryNone;
      }
      UITableViewCell *newCell = [myTableView cellForRowAtIndexPath:indexPath];
      newCell.accessoryType = UITableViewCellAccessoryCheckmark;
  }
  </code></pre>