Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ios keyboard bezier
  onKeyboardWillHide(e) {
    Animated.timing(this.state.height, {
      toValue: this.listViewMaxHeight,
      duration: e.duration,
      easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
    }).start();
  },

  onKeyboardWillShow(e) {
    Animated.timing(this.state.height, {
      toValue: this.listViewMaxHeight - (e.endCoordinates ? e.endCoordinates.height : e.end.height),
      duration: e.duration,
      easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
    }).start();
  },
@jondot
Copy link
Author

jondot commented Jan 14, 2016

Better curves:

      easing: Easing.bezier(.17,.59,.4,.77)

@zachgibson
Copy link

zachgibson commented May 17, 2016

Do you know anything about what easing is doing in this screenshot? You use e.duration, is there something in here to get the exact easing curve that the keyboard has?

image

@mattyclarkson
Copy link

mattyclarkson commented May 21, 2018

@romchambe
Copy link

romchambe commented Nov 9, 2018

Thanks for that, very useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment