[examples/ASCollectionView] Register supplementary kinds (#508)

This commit is contained in:
Huy Nguyen 2017-08-14 16:52:45 +01:00 committed by GitHub
parent a929950d2c
commit afeb25a6b4

View File

@ -55,6 +55,8 @@
layout.headerReferenceSize = CGSizeMake(50.0, 50.0); layout.headerReferenceSize = CGSizeMake(50.0, 50.0);
layout.footerReferenceSize = CGSizeMake(50.0, 50.0); layout.footerReferenceSize = CGSizeMake(50.0, 50.0);
self.collectionNode = [[ASCollectionNode alloc] initWithFrame:self.view.bounds collectionViewLayout:layout]; self.collectionNode = [[ASCollectionNode alloc] initWithFrame:self.view.bounds collectionViewLayout:layout];
[self.collectionNode registerSupplementaryNodeOfKind:UICollectionElementKindSectionHeader];
[self.collectionNode registerSupplementaryNodeOfKind:UICollectionElementKindSectionFooter];
#endif #endif
self.collectionNode.dataSource = self; self.collectionNode.dataSource = self;