mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASPagerNode] Fix ASPagerNodeProxy to use collectionNode (#2475)
* Fix ASProxyDelegate to use collectionNode * fix constrainedSize...issue
This commit is contained in:
@@ -593,7 +593,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* @return A constrained size range for layout the node at this index path.
|
||||
*/
|
||||
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode's method instead.");
|
||||
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED_MSG("Use ASCollectionNode's constrainedSizeForItemAtIndexPath: instead.");
|
||||
|
||||
/**
|
||||
* Informs the delegate that the collection view will add the given node
|
||||
|
||||
@@ -127,6 +127,8 @@
|
||||
return [_pagerDataSource numberOfPagesInPagerNode:self];
|
||||
}
|
||||
|
||||
#pragma mark - ASCollectionDelegate
|
||||
|
||||
- (ASSizeRange)collectionNode:(ASCollectionNode *)collectionNode constrainedSizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (_pagerDelegateImplementsConstrainedSizeForNode) {
|
||||
|
||||
@@ -116,10 +116,10 @@
|
||||
{
|
||||
return (
|
||||
// handled by ASPagerDataSource node<->cell machinery
|
||||
selector == @selector(collectionView:nodeForItemAtIndexPath:) ||
|
||||
selector == @selector(collectionView:nodeBlockForItemAtIndexPath:) ||
|
||||
selector == @selector(collectionView:numberOfItemsInSection:) ||
|
||||
selector == @selector(collectionView:constrainedSizeForNodeAtIndexPath:)
|
||||
selector == @selector(collectionNode:nodeForItemAtIndexPath:) ||
|
||||
selector == @selector(collectionNode:nodeBlockForItemAtIndexPath:) ||
|
||||
selector == @selector(collectionNode:numberOfItemsInSection:) ||
|
||||
selector == @selector(collectionNode:constrainedSizeForItemAtIndexPath:)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user