[ASPagerNode] Fix ASPagerNodeProxy to use collectionNode (#2475)

* Fix ASProxyDelegate to use collectionNode

* fix constrainedSize...issue
This commit is contained in:
Hannah Troisi
2016-10-24 16:10:56 -07:00
committed by GitHub
parent 86a5aece9c
commit 2834ba3490
3 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -127,6 +127,8 @@
return [_pagerDataSource numberOfPagesInPagerNode:self];
}
#pragma mark - ASCollectionDelegate
- (ASSizeRange)collectionNode:(ASCollectionNode *)collectionNode constrainedSizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
if (_pagerDelegateImplementsConstrainedSizeForNode) {

View File

@@ -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:)
);
}