-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
MSPeekImplementationDelegate returns under/over index in race conditions #67
Comments
Hello @fareast555 ! Thank you so much for raising this issue and pasting all the evidence! Have a great day! |
Hi @MaherKSantina . Thanks for the reply. One guy in our team had a pull request in updating to 3.1.1, thought it was already in, but it's still under review. Once it gets in I'll run some tests and update you. Actually, there are two issues, both which will hopefully disappear. The first is as reported here. The second, which I assumed might be related to this one -- which seems like a race time issue -- is that there are occasions where the collection view sends back the active index of the cell before the last cell, but shows the last cell in the array. As with the issue reported here, you have to really try a bunch of times quickly to go over index to get it to do it. Anyway, for now, I'll close off this issue if that's OK. If I see it in the 3.1.1 I'll open up a new issue. Thanks for making this insanely useful implementation. Getting collection views to work as expected is a pain, so this is really a great bit of software. |
And...as a PS. I'm digging into the latest code. Is there no longer any callback for an active Index? |
@fareast555 thank you soo much for your kind words! 🙏 Yeah I agree working with collection views is sometimes hard!
There is one that gives you the current index when the user scrolls to a new cell, you just have to conform to extension ViewController: UICollectionViewDelegate {
...
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
print(behavior.currentIndex)
}
} Please let me know if that works 👍 |
I'll give it a try. Cheers! |
MSPeekImplementationDelegate method:
Returns -1 if continuous fast swipe attempts made to go below the first cell...
or returns dataSource.count if trying to swipe beyond max cell.
This only happens when I really push it and swipe super fast.
Device: iPhone SE running 13.3.1
Xcode 11.3.1
Installed via cocoapods
The text was updated successfully, but these errors were encountered: