title: didSelectRowAtIndexPath selecting more than one row at a time
body: <p>I have a <code>UITableView</code> populated with 27 rows. I am trying to change the <code>accessoryType</code> of the selected cell. I do that in the <code>didSelectRowAtIndexPath:</code> delegate method.</p>
  
  <p>The problem I am facing is that, when selecting a row and changing the <code>accessoryType</code> of the cell, the eleventh row from that row also gets modified. </p>
  
  <p>I have tried printing the <code>[indexPath row]</code> value, but it's showing only the row that was selected and not another one.</p>
  
  <p>I am really puzzled by such stuff; please help me out.</p>
  
  <p><strong>ADDED THE CODE</strong> <code>cellForRowAtIndexPath</code> method</p>
  
  <pre><code>UITableViewCell *cell;
  if ([indexPath row] == 0) {
      cell = [tableView dequeueReusableCellWithIdentifier:@"acell"];
  }
  else {
      cell = [tableView dequeueReusableCellWithIdentifier:@"bcell"];
  }
  
  cell.selectionStyle = UITableViewCellSelectionStyleNone;
  
  if (cell == nil &amp;&amp; [indexPath row] != 0) {
      cell = [[[UITableViewCell alloc] initWithStyle:
               UITableViewCellStyleSubtitle reuseIdentifier:@"bcell"] autorelease];
  }
  else if(cell == nil &amp;&amp; [indexPath row] == 0){
      cell = [[[UITableViewCell alloc] initWithStyle:
               UITableViewCellStyleSubtitle reuseIdentifier:@"acell"] autorelease];
  }
  
  if ([cell.contentView subviews]){
      for (UIView *subview in [cell.contentView subviews]) {
          [subview removeFromSuperview];
      }
  }
  if ([indexPath row] == 0) {
      cell.textLabel.text = @"Select All";
      cell.textLabel.font = [UIFont boldSystemFontOfSize:13.0f];
  }
  else {
      cell.textLabel.text = @"Some Text Here"
      cell.detailTextLabel.text = @"Another piece of text here"   
  }
  return cell;
  </code></pre>
  
  <p>I am doing <code>%10</code> because the behaviour is repeating after 11th row, hence trying to create new object for every 11th row.</p>
  
  <p>My <code>didSelectRowAtIndexPath</code> methos code is</p>
  
  <pre><code>UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
  if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
      if ([indexPath row] != 0) {
          NSIndexPath *tempIndex = [NSIndexPath indexPathForRow:0 inSection:0];
          UITableViewCell *tempCell = [tableView cellForRowAtIndexPath:tempIndex];
          tempCell.accessoryType = UITableViewCellAccessoryNone;
      }
      cell.accessoryType = UITableViewCellAccessoryNone;
  }
  else{
      cell.accessoryType = UITableViewCellAccessoryCheckmark;
  }
  if ([indexPath row] == 0) {
      for (int i = 0; i &lt; [dataSource count]; i++) {
          NSIndexPath *tempIndex = [NSIndexPath indexPathForRow:i+1 inSection:0];
          UITableViewCell *tempCell = [tableView cellForRowAtIndexPath:tempIndex];
          if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
              tempCell.accessoryType = UITableViewCellAccessoryCheckmark;
          }
          else{
              tempCell.accessoryType = UITableViewCellAccessoryNone;
          }
      }
  }
  </code></pre>
  
  <p>Please help me in multiple selection or anyother way to solve the problem of multiple selection.</p>
  
  <p>Thanks in advance!!</p>