title: Storyboard parent-child relationship not representing what is returned by "superview"
body: <p><img src="https://i.stack.imgur.com/qLG8d.png" alt="I have this layout in a collection view"></p>
  
  <p>The Collection View Cell is subclassed in the following way:</p>
  
  <p><img src="https://i.stack.imgur.com/mqA23.png" alt="enter image description here"></p>
  
  <p>I have this layout in a collection view. On each button when it is created, I call the following code:</p>
  
  <pre><code>    [cell.imageButton addTarget:self action:@selector(galleryImageButtonClicked:event:) forControlEvents:UIControlEventTouchUpOutside];
  </code></pre>
  
  <p>Which calls this:</p>
  
  <pre><code>    -(void)galleryImageButtonClicked:(id)sender event:(id)event
  {
      if ([sender isKindOfClass:[UIButton class]])
      {
          NSLog(@"Yay, it's a UIButton.");
          SCCollectionViewCell* parentCellOfThisButton = (SCCollectionViewCell*)[sender superview];
          if ([parentCellOfThisButton isKindOfClass:[SCCollectionViewCell class]])
          {
              UICollectionView *parentCollectionView = (UICollectionView* )[parentCellOfThisButton superview];
          if ([parentCollectionView isKindOfClass:[UICollectionView class]])
          {
              NSIndexPath* indexPathOfCell = [parentCollectionView indexPathForCell:parentCellOfThisButton];
  
  
  
          } else {
              NSLog(@"Not a UIcollectionClass");
          }
      } else {
          NSLog(@"ERROR! 15268679");
      }
  }
  }
  </code></pre>
  
  <p>This fails on the line:</p>
  
  <pre><code>        if ([parentCellOfThisButton isKindOfClass:[SCCollectionViewCell class]])
  </code></pre>
  
  <p>Does anyone know why?</p>