Created
September 2, 2016 14:56
-
-
Save andatta/5e72020cad10a8120eb2f9196a1ee997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*The trick is to adopt the protocol UICollectionViewDelegateFlowLayout | |
and implement the following method*/ | |
//UICollectionViewDelegateFlowLayout method | |
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, | |
sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize{ | |
//specify height as per your requirement | |
return CGSize(width: collectionView.bounds.width, height: 120) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment