【问题标题】:React Native TextInput: Is it possible to make TextInput move up out of the way of keyboard on iOS same as for Android?React Native TextInput:是否可以让 TextInput 在 iOS 上像 Android 一样移出键盘?
【发布时间】:2020-05-04 04:29:59
【问题描述】:

我的 React Native 应用程序中有一个 TextInput 字段,它位于屏幕底部附近。当我单击输入它时,在 Android 上 TextInput 会向上移动,以便您在输入时仍然可以看到它,但在 iOS 上 TextInput 不会移动,所以在这种情况下它是隐藏在键盘后面。

有没有办法在 iOS 上做出相同的行为?

【问题讨论】:

    标签: reactjs react-native react-native-textinput


    【解决方案1】:

    请将您的文本输入容器包裹在KeyboardAvoidingView 中,或者如果您正在寻找更好的解决方案,您可以尝试KeyboardAwareScrollView,它一定会解决您的问题

    【讨论】:

      猜你喜欢
      • 2020-05-28
      • 1970-01-01
      • 2020-10-23
      • 2019-09-15
      • 2021-01-25
      • 1970-01-01
      • 2020-11-23
      • 2018-11-08
      • 1970-01-01
      相关资源
      最近更新 更多