Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

react native - Popup horizontally animate

My snack:

https://snack.expo.io/@sitenative/popup-modal-example

Popup open from bottom to top. When gesturing from left to right or conversely popup closed from top to bottom. How to make horizontal animation from left to right or vice versa depending on the user's gesture?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Gestures can be recorded by using React-Native's PanResponder API. You can use PanResponder and Animated API to get the desired Result.

you can check a examples from here!. https://reactnative.dev/docs/animations


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...