title: iOS - UICollectionView spacing still there when set to 0 - How to set with no spacing between cells
body: <p>I have a simple UICollectionView which I have set with 0 spacing in InterfaceBuilder but when I populate the collection view with cells there is still some spacing. Is there something special and not immediately obvious that I need to do in order to actually see a collectionview cell with 0 spacing beyond setting it to have 0 spacing? Thanks.</p>
  
  <p>EDIT* some code:</p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  
      UICollectionViewCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
  
      cell.backgroundColor = [UIColor clearColor];
  
      UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(2, 2, cell.frame.size.width -4, cell.frame.size.height -4)];
      lbl.backgroundColor = [UIColor clearColor];
      lbl.font = [UIFont boldSystemFontOfSize:20];
      lbl.text = [NSString stringWithFormat:@"$%0.0f", [[amountsArray objectAtIndex:indexPath.row] floatValue]];
      lbl.textAlignment = NSTextAlignmentCenter;
      lbl.layer.borderWidth = 1;
  
      [cell addSubview:lbl];
      [lbl release];
  
      return cell;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/jXndE.png" alt="enter image description here"></p>