【问题标题】:In-App Messaging: Top Banner hides behind Notch in React Native iOS应用内消息:顶部横幅隐藏在 React Native iOS 中的 Notch 后面
【发布时间】:2022-10-18 18:58:41
【问题描述】:

在具有 Notch 应用内消息的 iOS 设备中,顶部横幅隐藏在 Notch 后面

还尝试用SafeAreaView 包装app.js,以便整个应用程序使用SafeAreaView,但这不起作用 任何一个应用程序都使用SafeAreaView,但不是Top-Banner


项目文件

Javascript

package.json - Firebase Versions:

    "@react-native-firebase/analytics": "^14.1.0",
    "@react-native-firebase/app": "^14.1.0",
    "@react-native-firebase/auth": "^14.1.0",
    "@react-native-firebase/crashlytics": "^14.1.0",
    "@react-native-firebase/database": "^14.1.0",
    "@react-native-firebase/dynamic-links": "^14.1.0",
    "@react-native-firebase/in-app-messaging": "^14.1.0",
    "@react-native-firebase/messaging": "^14.1.0",
    "@react-native-firebase/perf": "^14.1.0",
    "@react-native-firebase/remote-config": "^14.1.0",

【问题讨论】:

    标签: ios firebase react-native react-native-firebase firebase-in-app-messaging


    【解决方案1】:

    您可以使用https://www.npmjs.com/package/react-native-device-info hasNotch() 检查设备是否有缺口,并相应地提供上边距。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-12
      • 2018-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多