uicollectionviewcell
UICollectionViewCell Border / Shadow
Just for a bit more implementation: #import <QuartzCore/QuartzCore.h> in your.m Make sure your class implements – (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath; as this is where the cell is setup. You can then change cell.layer.background (only available once quartz is imported) See below – (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath { MyCollectionViewCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@”pressieCell” forIndexPath:indexPath]; … Read more
UICollectionView estimatedItemSize – last cell is not aligned
I face a similar issue and the problem was solved by giving a proper minimum inter item spacing, using the delegate methods – minimumInteritemSpacingForSectionAt- of UICollectionViewDelegateFlowLayout.
Grid layout with CollectionView in Swift
Create the UICollectionViewController like this in a file that sub-classes from UICollectionViewController: convenience override init() { var layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.itemSize = CGSizeMake(<width>, <height>) // Setting the space between cells layout.minimumInteritemSpacing = <Space between columns> layout.minimumLineSpacing = <Space between rows> return (self.init(collectionViewLayout: layout)) } In the viewDidLoad you an set the background color like … Read more