fix(iOS): check for iOS 13 APIs (#8093)

This commit is contained in:
Vasil Chimev
2019-11-18 13:39:00 +02:00
committed by GitHub
parent d983f79923
commit b069ff38f3
12 changed files with 30 additions and 19 deletions

View File

@@ -89,7 +89,7 @@ class CADisplayLinkTarget extends NSObject {
}
class IOSApplication implements IOSApplicationDefinition {
private _backgroundColor = majorVersion <= 12 ? UIColor.whiteColor : UIColor.systemBackgroundColor;
private _backgroundColor = (majorVersion <= 12 || !UIColor.systemBackgroundColor) ? UIColor.whiteColor : UIColor.systemBackgroundColor;
private _delegate: typeof UIApplicationDelegate;
private _window: UIWindow;
private _observers: Array<NotificationObserver>;
@@ -121,7 +121,6 @@ class IOSApplication implements IOSApplicationDefinition {
}
get systemAppearance(): "light" | "dark" | null {
// userInterfaceStyle is available on UITraitCollection since iOS 12.
if (majorVersion <= 11) {
return null;