From f522d113e262411b2c7bccb297c0712f3e1aaabd Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Fri, 18 Sep 2020 18:30:44 -0700 Subject: [PATCH 1/2] Dark mode friendly iOS debugging message --- .../darwin/ios/framework/Source/FlutterViewController.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index ba7a8b5ca9471..2a22d36653853 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -338,6 +338,7 @@ - (void)pushRoute:(NSString*)route { messageLabel.textAlignment = NSTextAlignmentCenter; messageLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + messageLabel.textColor = UIColor.blackColor; messageLabel.text = @"In iOS 14+, Flutter application in debug mode can only be launched from Flutter tooling, " @"IDEs with Flutter plugins or from Xcode.\n\nAlternatively, build in profile or release " From ac5f6cc4a223939028c1b6419859af4f40cd363f Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 21 Sep 2020 11:53:44 -0700 Subject: [PATCH 2/2] UIColor.systemBackgroundColor --- .../darwin/ios/framework/Source/FlutterViewController.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 2a22d36653853..09773b0c81744 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -326,7 +326,11 @@ - (void)pushRoute:(NSString*)route { 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). @@ -338,7 +342,6 @@ - (void)pushRoute:(NSString*)route { messageLabel.textAlignment = NSTextAlignmentCenter; messageLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - messageLabel.textColor = UIColor.blackColor; messageLabel.text = @"In iOS 14+, Flutter application in debug mode can only be launched from Flutter tooling, " @"IDEs with Flutter plugins or from Xcode.\n\nAlternatively, build in profile or release "