Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
- {
- let heightOffset = (UIDevice.current.orientation.isPortrait) ? CGFloat(30) : CGFloat(0)
- let width = UIScreen.main.bounds.width
- let height = UIScreen.main.bounds.height - heightOffset
- return CGSize(width: width, height: height / CGFloat(mainScreenItems.count))
- }
Add Comment
Please, Sign In to add comment