From e2a62a10765c4bd6a2f0cb47216b48c9e0cc8942 Mon Sep 17 00:00:00 2001 From: xezero <0xc0dedead@gmail.com> Date: Fri, 9 Feb 2018 16:18:52 -0800 Subject: [PATCH 1/3] Add scrollViewWillEndDragging delegate --- Source/Private/ASIGListAdapterBasedDataSource.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Private/ASIGListAdapterBasedDataSource.m b/Source/Private/ASIGListAdapterBasedDataSource.m index 31a6c4582..fa3edea80 100644 --- a/Source/Private/ASIGListAdapterBasedDataSource.m +++ b/Source/Private/ASIGListAdapterBasedDataSource.m @@ -102,6 +102,11 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView [self.delegate scrollViewWillBeginDragging:scrollView]; } +- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset +{ + [self.delegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset]; +} + - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { [self.delegate scrollViewDidEndDragging:scrollView willDecelerate:decelerate]; From bdd2d666239800617e8afc6ce1aa5dba1ddf04fc Mon Sep 17 00:00:00 2001 From: xezero <0xc0dedead@gmail.com> Date: Sun, 11 Feb 2018 14:47:29 -0800 Subject: [PATCH 2/3] Make sure delegate can respond to scrollViewWillEndDragging --- Source/Private/ASIGListAdapterBasedDataSource.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Private/ASIGListAdapterBasedDataSource.m b/Source/Private/ASIGListAdapterBasedDataSource.m index fa3edea80..ab1863622 100644 --- a/Source/Private/ASIGListAdapterBasedDataSource.m +++ b/Source/Private/ASIGListAdapterBasedDataSource.m @@ -104,7 +104,10 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset { - [self.delegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset]; + // IGListAdapter doesn't implement scrollViewWillEndDragging yet (pending pull request), so we need this check for now. Doesn't hurt to have it anyways :) + if ([self.delegate respondsToSelector:@selector(scrollViewWillEndDragging:withVelocity:targetContentOffset:)]) { + [self.delegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset]; + } } - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate From 1ab0e6b23a5849fd59bffa9c34c550884c802449 Mon Sep 17 00:00:00 2001 From: xezero <0xc0dedead@gmail.com> Date: Sun, 11 Feb 2018 14:50:10 -0800 Subject: [PATCH 3/3] Add changes to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b50cd3a5..7704a477b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Optimized ASNetworkImageNode loading and resolved edge cases where the image provided to the delegate was not the image that was loaded. [Adlai Holler](https://github.com/Adlai-Holler) [#778](https://github.com/TextureGroup/Texture/pull/778/) - Make `ASCellNode` tint color apply to table view cell accessories. [Vladyslav Chapaev](https://github.com/ShogunPhyched) [#764](https://github.com/TextureGroup/Texture/pull/764) - Fix ASTextNode2 is accessing backgroundColor off main while sizing / layout is happening. [Michael Schneider](https://github.com/maicki) [#794](https://github.com/TextureGroup/Texture/pull/778/) +- Pass scrollViewWillEndDragging delegation through in ASIGListAdapterDataSource for IGListKit integration. [#796](https://github.com/TextureGroup/Texture/pull/796) ## 2.6 - [Xcode 9] Updated to require Xcode 9 (to fix warnings) [Garrett Moon](https://github.com/garrettmoon)