Clarify default value behavior of the layoutDelegate for flow layouts

This commit is contained in:
Levi McCallum
2015-10-11 11:28:01 -07:00
parent a9023dd400
commit ba72c73779
3 changed files with 25 additions and 7 deletions

View File

@@ -228,7 +228,9 @@ static BOOL _isInterceptedSelector(SEL sel)
// Register the default layout inspector delegate for flow layouts, custom layouts
// will need to roll their own ASCollectionViewLayoutInspecting implementation.
_layoutDelegate = [self flowLayoutInspector];
if ([layout asdk_isFlowLayout]) {
_layoutDelegate = [self flowLayoutInspector];
}
_registeredSupplementaryKinds = [NSMutableArray array];
@@ -249,8 +251,6 @@ static BOOL _isInterceptedSelector(SEL sel)
/**
* A layout inspector implementation specific for the sizing behavior of UICollectionViewFlowLayouts
*
* @discussion Will return nil if the current layout is not a flow layout
*/
- (ASCollectionViewFlowLayoutInspector *)flowLayoutInspector
{