Skip to content

Commit 0580f75

Browse files
obladorvshkl
authored andcommitted
Fix launch image matching for iPhone XR/XS Max portrait (wix#4707)
1 parent 29159da commit 0580f75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/ios/RNNSplashScreen.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ @implementation RNNSplashScreen
66

77
+ (void)showOnWindow:(UIWindow *)window {
88
CGRect screenBounds = [UIScreen mainScreen].bounds;
9+
CGFloat screenScale = [UIScreen mainScreen].scale;
910
UIViewController *viewController = nil;
1011

1112
NSString* launchStoryBoard = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
@@ -56,6 +57,10 @@ + (void)showOnWindow:(UIWindow *)window {
5657
imageName = [imageName stringByAppendingString:@"-1100-Portrait-2436h"];
5758
else if (screenHeight == 375)
5859
imageName = [imageName stringByAppendingString:@"-1100-Landscape-2436h"];
60+
else if (screenHeight == 828)
61+
imageName = [imageName stringByAppendingString:@"-1200-Portrait-1792h"];
62+
else if (screenHeight == 896)
63+
imageName = [imageName stringByAppendingString:screenScale == 2. ? @"-1200-Portrait-1792h" : @"-1200-Portrait-2688h"];
5964

6065
image = [UIImage imageNamed:imageName];
6166
}

0 commit comments

Comments
 (0)