Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

[ASCollectionView / ASPagerNode] Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate #2065

Merged
merged 3 commits into from
Aug 12, 2016
Merged

[ASCollectionView / ASPagerNode] Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate #2065

merged 3 commits into from
Aug 12, 2016

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Aug 12, 2016

Moving constrainedSizeForNodeAtIndexPath: to delegate in ASCollectionView as well as ASPagerNode to be aligned with similar Apple API's in UICollectionView

Will replace #1740

As ASPagerDataSource does not inherit from ASCollectionDataSource it's not possible to declare it as property.
@Adlai-Holler
Copy link
Contributor

Sweet! Let's replace - (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath with - (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForPageAtIndex:(NSInteger)pageIndex


/**
* Delegate is optional, and uses the same protocol as ASCollectionNode.
* This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay...
*/
@property (nonatomic, weak) id <ASPagerDelegate> delegate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update this comment since ASPagerDelegate is no longer the same protocol that ASCollectionNode uses.

@ghost ghost added the CLA Signed label Aug 12, 2016
@Adlai-Holler Adlai-Holler merged commit 93be894 into facebookarchive:master Aug 12, 2016
hannahmbanana pushed a commit that referenced this pull request Aug 12, 2016
…th from the DataSource to the Delegate (#2065)

* Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate in ASCollectionView and ASPagerNode

* Fix ASPagerNode declaration of dataSource and delegate

As ASPagerDataSource does not inherit from ASCollectionDataSource it's not possible to declare it as property.

* Update comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants