mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-20 13:19:16 +00:00
Small name changes
This commit is contained in:
parent
d82a2e810f
commit
8b3ec83bfd
@ -19,7 +19,7 @@
|
||||
|
||||
// Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction
|
||||
// of the collection view
|
||||
static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView *collectionView) {
|
||||
static inline ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView *collectionView) {
|
||||
CGSize maxSize = collectionView.bounds.size;
|
||||
if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) {
|
||||
maxSize.width = FLT_MAX;
|
||||
@ -65,7 +65,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView
|
||||
return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath];
|
||||
}
|
||||
|
||||
return NodeConstrainedSizeWithCollectionView(collectionView);
|
||||
return NodeConstrainedSizeForScrollDirection(collectionView);
|
||||
}
|
||||
|
||||
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
|
||||
@ -156,7 +156,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView
|
||||
return ASSizeRangeMake(itemSize, itemSize);
|
||||
}
|
||||
|
||||
return NodeConstrainedSizeWithCollectionView(collectionView);
|
||||
return NodeConstrainedSizeForScrollDirection(collectionView);
|
||||
}
|
||||
|
||||
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default");
|
||||
}
|
||||
|
||||
- (void)testThatISetALayoutInspectorForCustomLayouts
|
||||
- (void)testThatADefaultLayoutInspectorIsProvidedForCustomLayouts
|
||||
{
|
||||
UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
|
||||
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user