gpt4 book ai didi

ios - 如何更改托管博览会应用程序中的 Root View 背景?

转载 作者:行者123 更新时间:2023-11-29 05:18:00 24 4
gpt4 key购买 nike

随着 iOS 13 中页面表的引入,我的应用程序中出现了一个我似乎无法更改的白色背景(在白色页面表后面,以及底层页面的灰色顶部):

Example of issue

显然,对于大多数应用程序来说,黑色背景颜色看起来会更好。

对于弹出的 React Native 应用程序,可以使用:

https://github.com/johniak/react-native-root-view-background

我很好奇是否有人使用托管 Expo 找到了解决此问题的方法。因为我找不到太多关于这个问题的提示,除了:

https://github.com/expo/expo/issues/1563

最佳答案

There is an simple trick using navigator...
<NavigationContainer>
<Stack.Navigator
screenOptions={{
cardStyle: {
backgroundColor: 'Your_Color_Here'
}
}}
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Register" component={RegisterScreen} />
</Stack.Navigator>
</NavigationContainer >

您可以使用cardStyle将默认的白色背景颜色更改为您想要的背景颜色。我希望这个答案对我有用。

关于ios - 如何更改托管博览会应用程序中的 Root View 背景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58975165/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com