title: UICollectionView randomally not displaying a cell
body: <p>I have a UICollectionView that that scrolls vertically. It's first cell holds another UICollectionView that scrolls horizontally.</p>
  
  <p>On random occasions, the horizontal UICollectionView loads a cell, and does not displays it.
  So, what i can see is a couple of cells, empty space, and some more cells..
  I'm having difficulties detecting the cause for this. </p>
  
  <p>The Code looks like this:</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
  if (collectionView.tag == 1) {
  
      if (indexPath.section == 1) {
  
  // do some stuff
  
  } else if (collectionView.tag == 999) { // horizontal collection view
  
      HorizontalCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell999" forIndexPath:indexPath];
  
      [self addBorderToCellImageView:cell.imageView];
  
      [self updateHorizontalCell:cell forIndexPath:indexPath];
  
      return cell;
  }
  
  return [[UICollectionViewCell alloc] init]; // in any case, return a cell.
  }
  </code></pre>
  
  <p>second part is this:</p>
  
  <pre><code> // updating cells for collectionView.tag = 999;
  - (void)updateHorizontalCell:(HorizontalCell *)cell forIndexPath:(NSIndexPath *)indexPath
  {
  
  id obj = self.horizontalProductDataSource[indexPath.row]; // use introspection, and act accordingly.
  NSLog(@"section %ld, row %ld", (long)indexPath.section, (long)indexPath.row);
  
  if ([obj isKindOfClass:[Product class]]) {
  
      Product *wishListProduct = (Product *)obj;
  
      cell.subtitle.hidden = YES;
      cell.title.text = wishListProduct.name;
      NSLog(@"from product: %@", wishListProduct.name);
      NSLog(@"from cell: %@", cell.title.text);
      cell.price.text = [NSString stringWithFormat:@"%.f %@", wishListProduct.totalPrice, NSLocalizedString(@"Shekel", nil)];
  
      __weak HorizontalCell *weakCell = cell;
  
      NSString *imageURL;
  
      Image *image = [wishListProduct.pictuers lastObject];
      imageURL = image.url;
  
      [cell.imageView setImageWithURLRequest:[[NSURLRequest alloc] initWithURL:[NSURL URLWithString:imageURL]]
                            placeholderImage:[UIImage imageNamed:@"Icon.png"] 
                                     success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image){
                                         weakCell.imageView.image = image;
                                     }
                                     failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error){
                                         logIt(@"error while bringing photos into cells: %@", error);
                                     }];
  }
  </code></pre>
  
  <p>any help would be awesome!</p>