I have setup a UICollectionView with a FlowLayout that leaves no space in between cells in either the vertical or horizontal directions.
I have everything working, y
Here is my solution to issue just make middle cell of width 106 and other two with width 107 in method collectionView layout
NSInteger numColumns = 3;
CGSize deviceSize;
CGFloat width = self.view.frame.size.width / numColumns;
CGFloat height = width ;
NSInteger rem = (int)self.view.frame.size.width%numColumns;
if(indexPath.row == (1 + numColumns*counter) && rem != 0) {
deviceSize = CGSizeMake(floor (width), ceil(height));
counter++;
}
else {
deviceSize = CGSizeMake(ceil (width), ceil(height));
}
deviceSize = CGSizeMake(deviceSize.width, deviceSize.height);