reactrondev / react-native-web-swiper

Swiper-Slider for React-Native and React-Native-Web
213 stars 55 forks source link

in iOS ScrollView inside swiper conflict scroll! #68

Closed jakil93 closed 1 year ago

jakil93 commented 3 years ago

in ios scrollview and swiper scroll sametime... but android is okay.

how to fix that?!

Image of Yaktocat

oxyii commented 3 years ago

@jakil93 bounces? Also you can try to set positionFixed Swiper prop

jakil93 commented 3 years ago

@oxyii still sametime scrolling moving.. 😓

oxyii commented 3 years ago

@jakil93 I really don't understand what exactly wrong. Did you wanna to hold swiper while ScrollView is moving?

jakil93 commented 3 years ago

@oxyii yes! also, while scrollview moving swiper's gesture must disabled!

while swiper's gesture scrollview's scroll must disabled!

i want exactly that!

oxyii commented 3 years ago

@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 3 years ago

@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?

jarvisluong commented 1 year ago

the issue seems to be stale. please re-open if this is still needed. thanks