【问题标题】:React native header gets cut off when keyboard is up键盘启动时反应本机标题被切断
【发布时间】:2019-08-21 18:10:01
【问题描述】:

当键盘启动时,我的 react native 标头被向上推,其中的某些部分被切断。在像 iphone SE 这样的小屏幕上,这可以防止用户按下 CTA 按钮。当我后台和前台应用程序时,标题不再被切断,但我不确定如何以编程方式解决此问题。

【问题讨论】:

  • 请发布您的代码和样式

标签: react-native react-native-navigation responsiveness


【解决方案1】:

您可以使用 react-native 的 SafeAreaView。

import { SafeAreaView } from 'react-native';

您可以使用 SafeAreaView 包装您的组件。

参考:https://facebook.github.io/react-native/docs/safeareaview

【讨论】:

    猜你喜欢
    • 2019-04-24
    • 2020-04-22
    • 1970-01-01
    • 1970-01-01
    • 2018-01-04
    • 2020-08-06
    • 2022-09-30
    • 2020-04-02
    • 2023-01-24
    相关资源
    最近更新 更多