Created
July 24, 2018 08:24
-
-
Save MaherKSantina/119a12121c046e73673472294eb97dc4 to your computer and use it in GitHub Desktop.
MSPCVDI Snippet 2
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
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | |
let itemWidth = max(0, collectionView.frame.size.width - 2 * (cellSpacing + cellPeekWidth)) | |
return CGSize(width: itemWidth, height: collectionView.frame.size.height) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment