title: Selecting multiple rows of a UITableView
body: <p>This page
  <a href="http://networkpx.blogspot.com/2009/07/multiple-row-selection-with-uitableview.html" rel="nofollow">http://networkpx.blogspot.com/2009/07/multiple-row-selection-with-uitableview.html</a></p>
  
  <p>mentions a way to implement table views that can allow multiple selections of rows.</p>
  
  <p>At the time of this article, it seems that it was not a blessed way of doing this. </p>
  
  <p>Now, apparently, Apple is allowing this kind of tableViews. </p>
  
  <p>The article mentions this</p>
  
  <pre><code>NSArray* selectedRows = [tableView indexPathsForSelectedRows];
  </code></pre>
  
  <p>as a way of getting a list of all rows selected but this is not a legal functionality of the SDK.</p>
  
  <p>The big question is: how do I get a list of all rows selected, so I can perform an action with them?</p>
  
  <p>thanks  </p>
  
  <h2>EDIT</h2>
  
  <p>To answer some questions... this is the code I am using to discover if a row is selected, but this is giving me zero entries. </p>
  
  <pre><code>NSMutableArray *selectedRows = [[NSMutableArray alloc] init];
  
  for (int i=0; i&lt;[list count]; i++) {
  
   NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
   UITableViewCell *aCell = (UITableViewCell*) [myTable cellForRowAtIndexPath:indexPath];
   if (aCell.accessoryType == UITableViewCellAccessoryCheckmark) {
    [selectedRows addObject:indexPath];
   }
  }
  
  // selectedRows has always 0 entries... all cells give me their type as UITableViewCellAccessoryNone even those with checkmark
  </code></pre>