新的iOS 13更新引入了可选的系统范围。 这导致例如StatusBar以显示浅色文本,在白色背景上可能变得不可读。它还会破坏iOS日期时间选择器(请参见DatePickerIOS 或react-native-modal-datetime-picker)
答案 0 :(得分:13)
解决方案之一是
<key>UIUserInterfaceStyle</key>
<string>Light</string>
OR
AppDelegate.m
: if (@available(iOS 13.0, *)) {
rootView.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
答案 1 :(得分:0)
在您的app.json文件中添加:
{
"expo": {
...
"ios": {
"infoPlist": {
"UIUserInterfaceStyle": "Light"
}
},
}
答案 2 :(得分:0)
此解决方案似乎效果最好。将此添加到您的AppDelagate.m
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
//add this here vv
if (@available(iOS 13, *)) {
self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
//add this here ^^
return YES;