Created
May 5, 2018 22:08
-
-
Save wingchi/40da088b12dc976c8945cfb217c16c99 to your computer and use it in GitHub Desktop.
Logic for full width cell sizing
This file contains hidden or 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
| func cellSize(for frame: CGRect, at indexPath: IndexPath) -> CGSize { | |
| let height = (frame.height / 5) - 2 * GridViewModel.itemMargin | |
| let fullWidth = frame.width - 2 * GridViewModel.itemMargin | |
| return CGSize(width: fullWidth, height: height) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment