Created
November 6, 2018 21:59
-
-
Save msimard8/ea1691ad53db83b124a3ed9f259643b0 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
override func prepare(){ | |
super.prepare() | |
guard let cv = collectionView else {return} | |
let padding:CGFloat = 20.0 | |
self.sectionInset = UIEdgeInsets(top: self.minimumInteritemSpacing, left: padding, bottom: 0.0, right: padding) | |
self.itemSize = CGSize(width: (cv.frame.size.width - self.sectionInset.left - self.sectionInset.right - cv.contentInset.left - cv.contentInset.right) , height: 350) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment