セルを押すたびに、セルの画像を変更したい:
- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath
  {
      if ([[arrayOfImages objectAtIndex:indexPath.item] isEqual: @"dog.png"]) {
          [arrayOfImages replaceObjectAtIndex:indexPath.item withObject:@"cat.png"];
      } else if ([[arrayOfImages objectAtIndex:indexPath.item] isEqual: @"cat.png"]) {
          [arrayOfImages replaceObjectAtIndex:indexPath.item withObject:@"lion.png"];
      } else if ([[arrayOfImages objectAtIndex:indexPath.item] isEqual: @"lion.png"]) {
          [arrayOfImages replaceObjectAtIndex:indexPath.item withObject:@"dog.png"];
      }
    [myCollectionView reloadData];
  }
セルを押しても何も起こりません。別のセルを押すと、前のセルの画像が変わり、押すすべてのセルで同じことが起こります。変化する画像は常に前のセルの画像です。collectionViewをもう一度押すと、collectionViewが更新されないようです。