Clean up usage of internal flow layout inspector

This commit is contained in:
Levi McCallum
2015-10-12 18:19:40 -07:00
parent 8ac02a6eaf
commit e2bbde2a4e
3 changed files with 42 additions and 28 deletions

View File

@@ -337,7 +337,16 @@ static BOOL _isInterceptedSelector(SEL sel)
_asyncDelegateImplementsInsetSection = ([_asyncDelegate respondsToSelector:@selector(collectionView:layout:insetForSectionAtIndex:)] ? 1 : 0);
}
_flowLayoutInspector.collectionView = self;
[_flowLayoutInspector cacheSelectorsForCollectionView:self];
}
- (void)setCollectionViewLayout:(UICollectionViewLayout *)collectionViewLayout
{
[super setCollectionViewLayout:collectionViewLayout];
if ([collectionViewLayout asdk_isFlowLayout]) {
_flowLayoutInspector = nil;
_layoutDelegate = [self flowLayoutInspector];
}
}
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType