IOS
Which versions are you using:
p.s. If loop={false} is set - everything seems fine.
Just get the repo from
https://github.com/nixoz/swiperDemo
-
UPD: I guess it related to regression 'ScrollView contentOffset bug' -
https://github.com/facebook/react-native/issues/15808
UPD: Yup, it is.
Yes it's a regression, not working also on RN 0.46
not working also on RN 0.44
Have you try with loop=false ?
same issue here
The bug is here
if (loop) {
pages.unshift(total - 1 + '')
pages.push('0')
}
pages is modified but index is not updated. So the "current" page change.
Still exists in iOS whatever version.
Can you tell me what is the action in this step to update in Line 329?
https://github.com/leecade/react-native-swiper/blob/f00abfb859ce384be2003cfce3010c3fc0005be1/src/index.js#L324-L330
When I change the code,It works as well as Android
- this.setState(state)
+ Platform.OS !== 'ios'&&this.setState(state)
Most helpful comment
Have you try with loop=false ?