diff --git a/AsyncDisplayKit/ASPagerNode.h b/AsyncDisplayKit/ASPagerNode.h index 1dce834f22..658b7e1204 100644 --- a/AsyncDisplayKit/ASPagerNode.h +++ b/AsyncDisplayKit/ASPagerNode.h @@ -66,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN * @param index The index of the node. * @return A constrained size range for layout the node at this index. */ -- (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndex:(NSInteger)index; +- (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndex:(NSInteger)index ASDISPLAYNODE_DEPRECATED_MSG("Pages in a pager node should be the exact size of the collection node (default behavior)."); @end diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index ec64eab228..ffd2e34bea 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -153,11 +153,14 @@ - (ASSizeRange)collectionNode:(ASCollectionNode *)collectionNode constrainedSizeForItemAtIndexPath:(NSIndexPath *)indexPath { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (_pagerDelegateFlags.constrainedSizeForNode) { return [_pagerDelegate pagerNode:self constrainedSizeForNodeAtIndex:indexPath.item]; } +#pragma clang diagnostic pop - return ASSizeRangeMake(CGSizeZero, self.bounds.size); + return ASSizeRangeMake(self.bounds.size); } #pragma mark - Data Source Proxy