title: UITableView in UICollectionViewCell
body: <p>I have a <code>UICollectionView</code> whose all cells contains a <code>UITableView</code>. My <code>UICollectionView</code> delegate / datasource methods are handled by a view controller (let's say <code>TTCollectionViewController</code>), and <code>tableViews</code> are handled directly by <code>collection view cells</code> (<code>TTCollectionViewCell</code>).</p>
  
  <p>In order to change some label colors, I need to keep track of each selected rows on my tableViews so i did something like that :</p>
  
  <pre><code>//
  // TTCollectionViewCell.m
  //
  [...]
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      // keep track of selected drugs
      if (![self.selectedDrugIndexPaths containsObject:indexPath])
      {
          [self.selectedDrugIndexPaths addObject:indexPath];
      }
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
          TTTableViewCell *contentCell = [tableView dequeueReusableCellWithIdentifier:@"test"];
          if (contentCell == nil)
              contentCell = [[TTTableViewCell alloc] init];
  
          [...]
  
          // test
          if ([self.selectedDrugIndexPaths containsObject:indexPath]) {
              contentCell.drugLabel.textColor = [UIColor grayColor];
          } else {
              contentCell.drugLabel.textColor = [UIColor blackColor];
          }
  }
  [...]
  </code></pre>
  
  <p>But here's the thing : with the dequeue reusable thing, my <code>collectionView</code> is messing up all my tracks (on scrolling, selected rows on table 1 become selected on table 3 for example).</p>
  
  <p>I know it's a bad idea to don't use <code>dequeuereusable</code> (i don't even know if it's possible to not use it), but is there something similar that i can do ?</p>
  
  <p>Do anyone have already implement this kind of case ?</p>
  
  <p>Thx in advance.</p>
  
  <p>EDIT :</p>
  
  <p>Here's my <code>cellForRow...</code> methods of my collectionView as you asked for :</p>
  
  <pre><code>///
  /// TTCollectionController.m
  ///
  - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      TTCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
  
      cell.data = [self.data objectAtIndex:indexPath.row];
  
      return cell;
  }
  </code></pre>