TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

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

Closed rcancro closed 1 year ago

rcancro commented 1 year ago

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.