mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
[ASPagerNode] Rename constrainedSizeForNodeAtIndexPath: to constrainedSizeForNodeAtIndex: for consistency (#2097)
This commit is contained in:
parent
0bd664f9ed
commit
fa3a988b54
@ -61,13 +61,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@optional
|
@optional
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the constrained size range for measuring the node at the index path.
|
* Provides the constrained size range for measuring the node at the index.
|
||||||
*
|
*
|
||||||
* @param pagerNode The sender.
|
* @param pagerNode The sender.
|
||||||
* @param indexPath The index path of the node.
|
* @param index The index of the node.
|
||||||
* @returns A constrained size range for layout the node at this index path.
|
* @returns A constrained size range for layout the node at this index.
|
||||||
*/
|
*/
|
||||||
- (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath;
|
- (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndex:(NSInteger)index;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,7 @@
|
|||||||
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
|
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
if (_pagerDelegateImplementsConstrainedSizeForNode) {
|
if (_pagerDelegateImplementsConstrainedSizeForNode) {
|
||||||
return [_pagerDelegate pagerNode:self constrainedSizeForNodeAtIndexPath:indexPath];
|
return [_pagerDelegate pagerNode:self constrainedSizeForNodeAtIndex:indexPath.item];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ASSizeRangeMake(CGSizeZero, self.view.bounds.size);
|
return ASSizeRangeMake(CGSizeZero, self.view.bounds.size);
|
||||||
@ -163,7 +163,7 @@
|
|||||||
if (delegate != _pagerDelegate) {
|
if (delegate != _pagerDelegate) {
|
||||||
_pagerDelegate = delegate;
|
_pagerDelegate = delegate;
|
||||||
|
|
||||||
_pagerDelegateImplementsConstrainedSizeForNode = [_pagerDelegate respondsToSelector:@selector(pagerNode:constrainedSizeForNodeAtIndexPath:)];
|
_pagerDelegateImplementsConstrainedSizeForNode = [_pagerDelegate respondsToSelector:@selector(pagerNode:constrainedSizeForNodeAtIndex:)];
|
||||||
|
|
||||||
_proxyDelegate = delegate ? [[ASPagerNodeProxy alloc] initWithTarget:delegate interceptor:self] : nil;
|
_proxyDelegate = delegate ? [[ASPagerNodeProxy alloc] initWithTarget:delegate interceptor:self] : nil;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user