Answers for "react native detect swipe"

1

react native detect swipe

<View
      onTouchStart={e=> this.touchY = e.nativeEvent.pageY}
      onTouchEnd={e => {
        if (this.touchY - e.nativeEvent.pageY > 20)
          console.log('Swiped up')
      }}
      style={{height: 300, backgroundColor: '#ccc'}}
    />
Posted by: Guest on September-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language