-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
When scrolling, sometimes a viewcontroller would get skipped (index not consistent) #172
Comments
@gabuchan sounds like a weird one! Had a quick play and I can't seem to reproduce it in the example project, would you be possibly able to supply a demo that reproduces it or video the behaviour (maybe with logs)? For context: |
Thanks for the super quick reply! Apologies I omitted the logs but they basically are what the video reflects: it prints the actual index of the viewcontroller array and skips one. So when switching to
I'm printing the given Hope this helps! |
@gabuchan I take it you are using Tabman with this? It somehow looks like the number of items in the |
@msaps Negative, not using Tabman. Just plain Pageboy and custom views. I'm still looking into it a bit more but it's weird that in past versions this problem isn't happening... |
@gabuchan okay cool, will investigate further and see what I can find. Does sound odd that it used to be fine in previous versions! |
So basically the view that I'm creating shows the history of actions that a user did in the past with two viewing modes: monthly and yearly. I'm using the same
PageboyViewControllerDelegate
with these two modes and I'm locally tracking the "current index" for each viewing mode (when the user changes the viewing mode it would show the according month or year that he was previously seeing).It was working perfectly under version
2.2.0
but it seemed to have broken somewhere when I tried updating to2.5.4
(basically any version from2.3.4
). What happens here is that at function:if the array of viewcontrollers is, let's say 9, the
index
argument would start from the end (as originally set, so 8), and would jump directly to 6, then would normally continue 5-4-3-etc...And when scrolling back,
index
would skip again the number 7 for some random reason until I slowly scroll in it and kind of bruteforce the animation for the 7th viewcontroller to show. As a note I'm not changing any internal value of it and it only happen with that screen.Am I missing something trivial here?
Thanks so much in advance!
The text was updated successfully, but these errors were encountered: