Skip to content

Instantly share code, notes, and snippets.

@WooodHead
Forked from jondot/keybez.md
Created November 8, 2019 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WooodHead/da720c37e22771ba9026e853695bf3e5 to your computer and use it in GitHub Desktop.
Save WooodHead/da720c37e22771ba9026e853695bf3e5 to your computer and use it in GitHub Desktop.
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();
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment