Clean up layout delegate protocol API

This commit is contained in:
Levi McCallum
2015-10-12 18:48:30 -07:00
parent 772e9b95a4
commit 12194199cd
6 changed files with 23 additions and 29 deletions

View File

@@ -28,7 +28,7 @@
}
if (self != nil) {
[self cacheSelectorForCollectionView:collectionView];
[self cacheSelectorsForCollectionView:collectionView];
_layout = flowLayout;
}
return self;
@@ -59,7 +59,7 @@
return ASSizeRangeMake(CGSizeZero, constrainedSize);
}
- (NSUInteger)collectionView:(ASCollectionView *)collectionView numberOfSectionsForSupplementaryKind:(NSString *)kind
- (NSUInteger)collectionView:(ASCollectionView *)collectionView numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind
{
if ([collectionView.asyncDataSource respondsToSelector:@selector(numberOfSectionsInCollectionView:)]) {
return [collectionView.asyncDataSource numberOfSectionsInCollectionView:collectionView];
@@ -68,7 +68,7 @@
}
}
- (NSUInteger)collectionView:(ASCollectionView *)collectionView supplementaryViewsOfKind:(NSString *)kind inSection:(NSUInteger)section
- (NSUInteger)collectionView:(ASCollectionView *)collectionView supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section
{
return [self layoutHasSupplementaryViewOfKind:kind inSection:section collectionView:collectionView] ? 1 : 0;
}