Created
October 18, 2020 09:36
-
-
Save IsaAliev/f11d54bb5b281b617393b936bdbde859 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
extension ProfileViewController: UICollectionViewDelegateFlowLayout { | |
func collectionView( | |
_ collectionView: UICollectionView, | |
layout collectionViewLayout: UICollectionViewLayout, | |
referenceSizeForHeaderInSection section: Int | |
) -> CGSize { | |
.init(width: 1.0, height: 30.0) | |
} | |
func collectionView( | |
_ collectionView: UICollectionView, | |
layout collectionViewLayout: UICollectionViewLayout, | |
sizeForItemAt indexPath: IndexPath | |
) -> CGSize { | |
let width = collectionView.frame.width - collectionView.contentInset.left * 2.0 | |
return .init(width: width, height: 50.0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment