Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASCellNodeVisibilityEvent] Add a new event when scrolling stops #2084

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Jul 25, 2023

We have ASCellNodeVisibilityEvent events that roughly correlate to the scrollViewDid… delegate methods in UIScrollView. With the current events we get a callback when a user stops dragging a cell, but if the cell decelerates we do not get an event when it comes to a rest. I’ve added ASCellNodeVisibilityEventDidStopScrolling to have both ASTableView and ASCollectionView send this event to the cells in _cellsForVisibilityUpdates in - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView.

I created unit tests to ensure that the proper events are being called for the proper scroll delegate methods.

Copy link
Contributor

@raycsh017 raycsh017 left a comment

Choose a reason for hiding this comment

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

Seems like a pretty straightforward change adding a visibility event

We have `ASCellNodeVisibilityEvent` events that roughly correlate to the scrollViewDid… delegate methods in UIScrollView. With the current events we get a callback when a user stops dragging a cell, but if the cell decelerates we do not get an event when it comes to a rest. I’ve added  `ASCellNodeVisibilityEventDidStopScrolling` to have both `ASTableView` and `ASCollectionView` send this event to the cells in `_cellsForVisibilityUpdates` in `- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView`.

I created unit tests to ensure that the proper events are being called for the proper scroll delegate methods.
@rcancro rcancro merged commit 28e3bae into TextureGroup:master Jul 26, 2023
andrey-golovin-ios added a commit to andrey-golovin-ios/Texture that referenced this pull request Oct 5, 2023
* 'master' of https://github.com/TextureGroup/Texture:
  Fix build errors and a crash in xcode 15 (TextureGroup#2093)
  [ASCellNodeVisibilityEvent] Add a new event when scrolling stops (TextureGroup#2084)
  Trying to get CI to work (TextureGroup#2085)
  fix typo: ASStackLayoutElement.h (TextureGroup#2067)
  Docs: Fix references of ASViewController/ASNavigationController (non-existent) to ASDKViewController/ASDKNavigationController (TextureGroup#2072)
  [ASTextKitRenderer] Adding locking when accessing the text renderer cache (TextureGroup#2075)
  Switch UITextWritingDirection to NSWritingDirection (TextureGroup#2071)
muukii pushed a commit to FluidGroup/Texture that referenced this pull request Dec 13, 2024
…tureGroup#2084)

We have `ASCellNodeVisibilityEvent` events that roughly correlate to the scrollViewDid… delegate methods in UIScrollView. With the current events we get a callback when a user stops dragging a cell, but if the cell decelerates we do not get an event when it comes to a rest. I’ve added  `ASCellNodeVisibilityEventDidStopScrolling` to have both `ASTableView` and `ASCollectionView` send this event to the cells in `_cellsForVisibilityUpdates` in `- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView`.

I created unit tests to ensure that the proper events are being called for the proper scroll delegate methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants