[ASCollectionViewLayoutInspecting] make -scrollableDirections required (#2543)

* [ASCollectionViewLayoutInspecting] make -scrollableDirections a required method

* doh!

* fixed?

* add assert per @appleguy's comment

* use self.layoutInspector, add check at the start of didChangeBounds...
This commit is contained in:
Hannah Troisi
2016-11-08 20:48:16 -08:00
committed by Adlai Holler
parent 55b5dff80c
commit edf2b669ae
4 changed files with 21 additions and 24 deletions

View File

@@ -79,6 +79,12 @@ static inline ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView
return NodeConstrainedSizeForScrollDirection(collectionView);
}
- (ASScrollDirection)scrollableDirections
{
ASDisplayNodeAssert(NO, @"layoutInspector object must implement -scrollableDirections %@", self);
return ASScrollDirectionNone;
}
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
ASDisplayNodeAssert(NO, @"To support supplementary nodes in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)");