Small name changes

This commit is contained in:
Michael Schneider 2016-07-08 11:47:46 -07:00
parent d82a2e810f
commit 8b3ec83bfd
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@
// Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction // Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction
// of the collection view // of the collection view
static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView *collectionView) { static inline ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView *collectionView) {
CGSize maxSize = collectionView.bounds.size; CGSize maxSize = collectionView.bounds.size;
if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) { if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) {
maxSize.width = FLT_MAX; maxSize.width = FLT_MAX;
@ -65,7 +65,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView
return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath];
} }
return NodeConstrainedSizeWithCollectionView(collectionView); return NodeConstrainedSizeForScrollDirection(collectionView);
} }
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
@ -156,7 +156,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView
return ASSizeRangeMake(itemSize, itemSize); return ASSizeRangeMake(itemSize, itemSize);
} }
return NodeConstrainedSizeWithCollectionView(collectionView); return NodeConstrainedSizeForScrollDirection(collectionView);
} }
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath

View File

@ -124,7 +124,7 @@
XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default"); XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default");
} }
- (void)testThatISetALayoutInspectorForCustomLayouts - (void)testThatADefaultLayoutInspectorIsProvidedForCustomLayouts
{ {
UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];