Created
July 2, 2020 17:17
-
-
Save stevencurtis/af816045192163ecd931891f9d387148 to your computer and use it in GitHub Desktop.
layoutsectionprotocol
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
protocol LayoutSection { | |
var layoutSection: NSCollectionLayoutSection {get} | |
func configureCell(collectionView: UICollectionView, | |
indexPath: IndexPath, | |
item: AnyHashable, | |
position: Int) -> UICollectionViewCell | |
func header(collectionView: UICollectionView, indexPath: IndexPath) -> UICollectionReusableView? | |
} | |
extension LayoutSection { | |
func header(collectionView: UICollectionView, indexPath: IndexPath) -> UICollectionReusableView? { | |
return nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment