title: Where to highlight UICollectionViewCell: delegate or cell?
body: <p>According to the <a href="http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/CreatingCellsandViews/CreatingCellsandViews.html#//apple_ref/doc/uid/TP40012334-CH7-SW8" rel="noreferrer">Collection View Programming Guide</a> one should handle the visual state of the cell highlights in the <code>UICollectionViewDelegate</code>. Like this:</p>
  
  <pre><code>- (void)collectionView:(PSUICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath
  {
      MYCollectionViewCell *cell = (MYCollectionViewCell*)[collectionView cellForItemAtIndexPath:indexPath];
      [cell highlight];
  }
  
  - (void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath
  {
      MYCollectionViewCell *cell = (MYCollectionViewCell*)[collectionView cellForItemAtIndexPath:indexPath];
      [cell unhighlight];
  }
  </code></pre>
  
  <p>What I don't like about this approach is that it adds logic to the delegate that is very specific to the cell. In fact, <code>UICollectionViewCell</code> manages its highlighted state independently, via the <code>highlighted</code> property.</p>
  
  <p>Wouldn't overriding <code>setHighlighted:</code> be a cleaner solution, then?</p>
  
  <pre><code>- (void)setHighlighted:(BOOL)highlighted
  {
      [super setHighlighted:highlighted];
      if (highlighted) {
          [self highlight];
      } else {
          [self unhighlight];
      }
  }
  </code></pre>
  
  <p>Are there any disadvantages to this approach instead of the delegate approach?</p>