I solved this issue and got the layout I desired with the following:
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
cell.backgroundColor = [UIColor clearColor];
//clear any contents on the cell
for (UIView *subView in [cell subviews]) {
[subView removeFromSuperview];
}
//Label to put on the cell
UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(2, 2, cell.frame.size.width -4, cell.frame.size.height -4)];
lbl.backgroundColor = [UIColor clearColor];
lbl.textColor = [UIColor colorWithRed:[CPExtras RGBtoPercent:70] green:[CPExtras RGBtoPercent:92] blue:[CPExtras RGBtoPercent:105] alpha:1];
lbl.font = [UIFont boldSystemFontOfSize:20];
lbl.text = @"100";
lbl.textAlignment = NSTextAlignmentCenter;
//Give the cell a border
cell.layer.borderColor = [[UIColor colorWithRed:[CPExtras RGBtoPercent:70] green:[CPExtras RGBtoPercent:92] blue:[CPExtras RGBtoPercent:105] alpha:0.5] CGColor];
cell.layer.borderWidth = 0.5;
[cell addSubview:lbl];
[lbl release];
return cell;
}
In IB I had these measurement settings for the collectionview: