From 01d6878cc864637b1945a182187d24785df8b770 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 21 Sep 2020 15:07:02 -0700 Subject: [PATCH] Dark mode friendly iOS debugging message (flutter/engine#21277) --- .../darwin/ios/framework/Source/FlutterViewController.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index ba7a8b5ca9..09773b0c81 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -326,7 +326,11 @@ static UIView* GetViewOrPlaceholder(UIView* existing_view) { auto placeholder = [[[UIView alloc] init] autorelease]; placeholder.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - placeholder.backgroundColor = UIColor.whiteColor; + if (@available(iOS 13.0, *)) { + placeholder.backgroundColor = UIColor.systemBackgroundColor; + } else { + placeholder.backgroundColor = UIColor.whiteColor; + } placeholder.autoresizesSubviews = YES; // Only add the label when we know we have failed to enable tracing (and it was necessary).