-
Notifications
You must be signed in to change notification settings - Fork 276
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
setPage shows wrong page in iOS #171
Comments
I have a similar problem, setPage and setPageWithoutAnimation does not work on iOS. It does not have any effect. |
Are you changing the state when calling viewPager.setPage()? If you are then the ViewPager is re-rendering in iOS and that might be the source of the problem. I had a similar problem specifically in iOS because of that. Hope this could (still) help you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I developed a set of pages using rn-viewpager, using Expo SDK 32, and ran it on an Android emulator while doing so.
It works flawlessly on the Android emulator.
I started testing it on my physical iPhone, and to my surprise, every time I use
setPage(pageIndex)
, the wrong page shows up, and I think it just always skips 2 pages instead of just one.Are you aware of why would such strange behaviour would occur on iOS? I ran it like a million times on Android and it worked fine.
this is my code that called the
setPage()
function, and i even tracked it in my logs, and it is NOT being called twice.and this is my render function, that shows the pager
Looking forward to hearing what you guys & gals have to suggest, and if you need more snippets of code to better understand the problem, don't hesitate to write I'll post it here
Environment:
Expo: SDK 32
rn-viewpager: 1.2.9
iOS: 12.3.1
iPhone: SE
The text was updated successfully, but these errors were encountered: