From c4b948f62ee4296dec01b14f55c48d207c687bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Bigio?= Date: Fri, 22 Jan 2016 06:56:36 -0800 Subject: [PATCH] Make "Loading from pre-bundle" message more distinctive Reviewed By: javache Differential Revision: D2849126 fb-gh-sync-id: 28b42650de3716b43d228e83ede215aaa9098858 --- React/Modules/RCTDevLoadingView.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/React/Modules/RCTDevLoadingView.m b/React/Modules/RCTDevLoadingView.m index f522794ab..e6d20261e 100644 --- a/React/Modules/RCTDevLoadingView.m +++ b/React/Modules/RCTDevLoadingView.m @@ -67,12 +67,10 @@ RCT_EXPORT_MODULE() if (!_window && !RCTRunningInTestEnvironment()) { CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 22)]; - _window.backgroundColor = [UIColor blackColor]; _window.windowLevel = UIWindowLevelStatusBar + 1; _label = [[UILabel alloc] initWithFrame:_window.bounds]; _label.font = [UIFont systemFontOfSize:12.0]; - _label.textColor = [UIColor grayColor]; _label.textAlignment = NSTextAlignmentCenter; [_window addSubview:_label]; @@ -81,14 +79,17 @@ RCT_EXPORT_MODULE() NSString *source; if (URL.fileURL) { + _window.backgroundColor = [UIColor greenColor]; + _label.textColor = [UIColor whiteColor]; source = @"pre-bundled file"; } else { + _window.backgroundColor = [UIColor blackColor]; + _label.textColor = [UIColor grayColor]; source = [NSString stringWithFormat:@"%@:%@", URL.host, URL.port]; } _label.text = [NSString stringWithFormat:@"Loading from %@...", source]; _window.hidden = NO; - }); }