Last active
July 18, 2017 20:54
-
-
Save gwennguihal/0000c7d76ce0e6c7c93cb5d03669df19 to your computer and use it in GitHub Desktop.
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
| import Collor | |
| final class TitleDescriptor: CollectionCellDescribable { | |
| let identifier: String = "TitleCollectionViewCell" | |
| let className: String = "TitleCollectionViewCell" | |
| var selectable:Bool = true | |
| let adapter: TitleAdapter | |
| init(adapter:TitleAdapter) { | |
| self.adapter = adapter | |
| } | |
| func size(_ collectionView: UICollectionView, sectionDescriptor: CollectionSectionDescribable) -> CGSize { | |
| let sectionInset = sectionDescriptor.sectionInset(collectionView) | |
| let width:CGFloat = collectionView.bounds.width - sectionInset.left - sectionInset.right | |
| return CGSize(width:width, height:50) | |
| } | |
| public func getAdapter() -> CollectionAdapter { | |
| return adapter | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment