mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +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