I am using carousel from react-native-snap-carousel module to scroll images horizontally from remote urls. it is working fine in android but in case of iOS sometimes the image is getting scrolled, most of the times not.
It is detecting my slide action but the image is not getting scrolled.
I have tried on iOS 13.1.3, react-native 0.59.8, react-native-snap-carousel 3.8.2
Following code is for Carousel
<Carousel
borderTopRightRadius={2}
borderTopLeftRadius={2}
ref={c => (this._ref = c)}
data={images}
renderItem={item => this.renderItem(item)}
onSnapToItem={index => {
this.setState({ currentImage: index });
onSliderMove(index);
}}
layout={"default"}
sliderWidth={parentWidth || width}
itemWidth={parentWidth || width}
loop={circleLoop || false}
contentContainerCustomStyle={{}}
scrollEnabled={scrollable}
onStartShouldSetResponderCapture={() => {
return scrollable;
}}
onMoveShouldSetResponderCapture={() => {
return scrollable;
}}
layoutCardOffset={20}
/>
I am using a custom component to load an image.
renderItem = ({ item, index }) => {
return (
<View style={{ width, height }}>
<LoadableImage
url={item}
index={index}
/>
</View>
)
}
Expected results: Horizontal scrolling should work on iOS smoothly. Actual results: Horizontal scrolling is not working most of the time.
Help me solve this issue