mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 00:20:31 +00:00
Make "Loading from pre-bundle" message more distinctive
Reviewed By: javache Differential Revision: D2849126 fb-gh-sync-id: 28b42650de3716b43d228e83ede215aaa9098858
This commit is contained in:
parent
f7cb745195
commit
c4b948f62e
@ -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;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user