title: Cells in UICollectionView are overlapping
body: <p>I'm using a ViewController in which I add a UICollectionView this way:</p>
  
  <pre><code>UICollectionViewFlowLayout *collectionViewFlowLayout = [[UICollectionViewFlowLayout alloc] init];
  [collectionViewFlowLayout setScrollDirection:UICollectionViewScrollDirectionVertical];
  [collectionViewFlowLayout setMinimumInteritemSpacing:2];
  [collectionViewFlowLayout setMinimumLineSpacing:4];
  [collectionViewFlowLayout setHeaderReferenceSize:CGSizeMake(320, 30)];
  
  CGRect collectionViewFrame = self.view.bounds;
  self.collectionView = [[UICollectionView alloc] initWithFrame:collectionViewFrame collectionViewLayout:collectionViewFlowLayout];
  self.collectionView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
  
  self.collectionView.delegate = self;
  self.collectionView.dataSource = self;
  
  [self.collectionView registerClass:[MyCollectionViewCell class] forCellWithReuseIdentifier:myCellIdentifier];
  
  [self.view addSubview:self.collectionView];
  </code></pre>
  
  <p>And this is how I'm initializing my custom cell object (I made sure the frame for each cell filled the whole width of the screen, so that the cells would be rendered one after another vertically in the UICollectionView):</p>
  
  <pre><code>CGSize mySize = CGSizeMake(320, 158);
  self.myTitle = [[UILabel alloc ] initWithFrame:CGRectMake(0, 0, mySize.width, mySize.height)];
  [self.myTitle setTextColor:[UIColor whiteColor]];
  [self.myTitle setBackgroundColor:[UIColor greenColor]];
  [self.myTitle setTextAlignment:NSTextAlignmentLeft];
  [self.myTitle setNumberOfLines:1];
  [self.myTitle setText:@"My Title"];
  [self addSubview:self.myTitle];
  </code></pre>
  
  <p>This is how I initialize the frame of the cell in initWithNibName:</p>
  
  <pre><code>CGSize mySize = CGSizeMake(320, 158);
  self = [super initWithFrame:CGRectMake(0, 0, mySize.width, mySize.height)];
  </code></pre>
  
  <p>And here's my cellForItemAtIndexPath code:</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  UICollectionViewCell *cell = (UICollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:myCellIdentifier forIndexPath:indexPath];
  
      return cell;
  }
  </code></pre>
  
  <p>Now I have four of these cells, yet they are overlapping. What am I doing wrong? Thanks!</p>