mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
Clean up caching of collection view delegate selectors on the inspector
This commit is contained in:
@@ -30,19 +30,18 @@
|
||||
}
|
||||
|
||||
if (self != nil) {
|
||||
[self cacheSelectorsForCollectionView:collectionView];
|
||||
[self didChangeCollectionViewDelegate:collectionView.asyncDelegate];
|
||||
_layout = flowLayout;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)cacheSelectorsForCollectionView:(ASCollectionView *)collectionView
|
||||
- (void)didChangeCollectionViewDelegate:(id<ASCollectionViewDelegate>)delegate;
|
||||
{
|
||||
if (collectionView == nil) {
|
||||
if (delegate == nil) {
|
||||
_delegateImplementsReferenceSizeForHeader = nil;
|
||||
_delegateImplementsReferenceSizeForFooter = nil;
|
||||
} else {
|
||||
id<ASCollectionViewDelegateFlowLayout> delegate = [self delegateForCollectionView:collectionView];
|
||||
_delegateImplementsReferenceSizeForHeader = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForHeaderInSection:)];
|
||||
_delegateImplementsReferenceSizeForFooter = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForFooterInSection:)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user