Skip to content

Commit

Permalink
Fix launch image matching for iPhone XR/XS Max portrait (#4707)
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador authored and yogevbd committed Feb 11, 2019
1 parent 8e50a8e commit dfd894a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ios/RNNSplashScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ @implementation RNNSplashScreen

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

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

image = [UIImage imageNamed:imageName];
}
Expand Down

0 comments on commit dfd894a

Please sign in to comment.