title: Collection View Cell does not display image in image view
body: <p>I am trying to create a simple gallery for an iOS application. I'm working with a UICollectionView inside of a ViewController. Everything seems to be working fine, but I can't get the image I'm trying to use to display inside of the collection view cell. I will just dump some code here, I have been desperate to find a solution but nothing seems to work.</p>
  
  <p>This is the gallery.m file:</p>
  
  <pre><code>-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView;
  {
      //just a random value for testing
      return 2;
  }
  
  -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:   (NSInteger)section
  {
      //another random test value
      return 5;
  }
  
  -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *identifier = @"customCell";
  
      customCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier
                                            forIndexPath:indexPath];
      //UIImage *image = [dataArray objectAtIndex:indexPath.row];
      cell.imageView.image = [UIImage imageNamed:@"skull.png"];
  
      //I tried all of the below code to get the image to show but nothing seemed to work
      //[cell.imageView setImage:[UIImage imageNamed:@"skull.png"]];
      //[cell.imageView setNeedsDisplay];
      //[cell.imageView reloadInputViews];
      return cell;
  }
  </code></pre>
  
  <p>This is the customCell.h file (the UIImageView outlet is connected to the image view inside of the collection view cell):</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface customCell : UICollectionViewCell
  @property (strong, nonatomic) IBOutlet UIImageView *imageView;
  
  @end
  </code></pre>
  
  <p>Concerning the connections in the storyboard everything should be fine, also it would be difficult to show here but I will try to explain anyways.
  The UICollectionView is connected in the gallery.h file like so:</p>
  
  <pre><code>@interface gallery : UIViewController &lt;UICollectionViewDataSource, UICollectionViewDelegate,UICollectionViewDelegateFlowLayout&gt;
  
  @property (strong, nonatomic) IBOutlet UICollectionView *collectionView;
  
  
  @end
  </code></pre>
  
  <p>The collection view cell in the storyboard has the custom class "customCell" and identifier "customCell".</p>
  
  <p>If anybody could point me to where my mistake could be it would be awesome!
  Thank you!</p>