diff --git a/React/DevSupport/RCTDevLoadingView.m b/React/DevSupport/RCTDevLoadingView.m index 9872b1a35b7f1b..0b921374d80fa8 100644 --- a/React/DevSupport/RCTDevLoadingView.m +++ b/React/DevSupport/RCTDevLoadingView.m @@ -73,8 +73,15 @@ - (void)setBridge:(RCTBridge *)bridge dispatch_async(dispatch_get_main_queue(), ^{ self->_showDate = [NSDate date]; if (!self->_window && !RCTRunningInTestEnvironment()) { - CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; - self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 22)]; + CGSize screenSize = [UIScreen mainScreen].bounds.size; + if (screenSize.height == 812 /* iPhone X */) { + self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, 60)]; + self->_label = [[UILabel alloc] initWithFrame:CGRectMake(0, 30, self->_window.bounds.size.width, 30)]; + } else { + self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, 22)]; + self->_label = [[UILabel alloc] initWithFrame:self->_window.bounds]; + } + [self->_window addSubview:self->_label]; #if TARGET_OS_TV self->_window.windowLevel = UIWindowLevelNormal + 1; #else @@ -83,11 +90,8 @@ - (void)setBridge:(RCTBridge *)bridge // set a root VC so rotation is supported self->_window.rootViewController = [UIViewController new]; - self->_label = [[UILabel alloc] initWithFrame:self->_window.bounds]; self->_label.font = [UIFont systemFontOfSize:12.0]; self->_label.textAlignment = NSTextAlignmentCenter; - - [self->_window addSubview:self->_label]; } self->_label.text = message;