Animated(panResponder.2 with offset)

김종민·2022년 4월 12일
0

React-Native(2. LongApp)

목록 보기
5/6

설명: 터치가 끝났을 경우, 위치가 끝난 위치에 머물러 있게 값을 설정.

  1. onPanResponderGrant : setOffse을 통해 터치가 끝난 마지막 좌표를 기억해줌.

  2. onPanResponderRelease : flattenOffest을 통해 setOffset의 좌표를 초기화 해줌,
    --->Box의 움직임이 jump하는 현상이 없어짐.!! 매우 중요함..

profile
코딩하는초딩쌤

0개의 댓글