我目前正在使用 Expo 和 React Navigation 在我的应用程序的深色主题和浅色主题之间切换。唯一的问题是 I\xe2\x80\x99m 无法根据主题更改 iOS 上的状态栏颜色。
\n我在抽屉导航器中嵌套了一个选项卡导航器,但是当我切换嵌套导航中所有屏幕的主题时,我\xe2\x80\x99m 无法弄清楚如何更改 iOS 上的状态栏颜色。这就是我的抽屉导航器的一部分的样子。
\n <themeContext.Provider value={themeData}>\n <NavigationContainer theme={theme == 'Light' ? CustomDefaultTheme : CustomDarkTheme}>\n <Drawer.Navigator\n screenOptions={{\n headerShown: false,\n swipeEdgeWidth: 0,\n drawerActiveBackgroundColor: '#e8e4f0',\n drawerActiveTintColor: '#8a76b6',\n drawerInactiveBackgroundColor: 'transparent',\n drawerInactiveTintColor: '#bcbcc1',\n\n }}\nRun Code Online (Sandbox Code Playgroud)\n