Dark mode friendly iOS debugging message (flutter/engine#21277)

This commit is contained in:
Jenn Magder
2020-09-21 15:07:02 -07:00
committed by GitHub
parent 7b15621129
commit 01d6878cc8

View File

@@ -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).