in iOS ScrollView inside swiper conflict scroll!
jakil93 opened this issue · comments
jakil93 commented
Ruslan Baybekov commented
Ruslan Baybekov commented
@jakil93 I really don't understand what exactly wrong. Did you wanna to hold swiper while ScrollView is moving?
jakil93 commented
@oxyii
yes! also, while scrollview moving swiper's gesture must disabled!
while swiper's gesture scrollview's scroll must disabled!
i want exactly that!
Ruslan Baybekov commented
@jakil93 You can control it by your-self. Something like this (not tested):
import { useState } from 'react';
export default () => {
const [swiperGestureEnabled, setSwiperGestureEnabled] = useState(true);
return (
<ScrollView
onMomentumScrollBegin={() => setSwiperGestureEnabled(false)}
onMomentumScrollEnd={() => setSwiperGestureEnabled(true)}
>
<Swiper gesturesEnabled={swiperGestureEnabled}>
<View />
<View />
</Swiper>
</ScrollView>
);
}
jakil93 commented
@oxyii
Thanks bro!
but still while swiper gesture working, also scroll view's scroll wokring..
i try to stop scrollview's scroll using by swiper's onAnimationStart/End.
but so slowly...
Do you have another way?
D.H. Luong commented
the issue seems to be stale. please re-open if this is still needed. thanks