Github user jcesarmobile commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-splashscreen/pull/69#discussion_r48450551
  
    --- Diff: src/ios/CDVSplashScreen.m ---
    @@ -187,7 +187,35 @@ - 
(NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(i
         {
             imageName = @"Default";
         }
    -    
    +
    +    // Add Asset Catalog specific prefixes
    +    if ([imageName isEqual:@"LaunchImage"])
    +    {
    +        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
    +        {
    +            float screenHeight = [UIScreen mainScreen].bounds.size.height;
    +            float screenWidth = [UIScreen mainScreen].bounds.size.width;
    +            float maxScreenDimensionSize = MAX(screenHeight, screenWidth);
    +
    +            if (maxScreenDimensionSize == 480) imageName = [imageName 
stringByAppendingString:@"-700"]; // iPhone 4/4s, 3.5 inch screen
    +            if (maxScreenDimensionSize == 568) imageName = [imageName 
stringByAppendingString:@"-700"]; // iPhone 5/5s, 4.0 inch screen
    +            if (maxScreenDimensionSize == 667) imageName = [imageName 
stringByAppendingString:@"-800"]; // iPhone 6, 4.7 inch screen
    +            if (maxScreenDimensionSize == 736)
    +            {
    +                imageName = [imageName stringByAppendingString:@"-800"];  
// iPhone 6+, 5.5 inch screen
    +                if (currentOrientation == UIInterfaceOrientationPortrait 
|| currentOrientation == UIInterfaceOrientationPortraitUpsideDown)
    +                {
    +                    imageName = [imageName 
stringByAppendingString:@"-Portrait"];
    +                }
    +            }
    +        }
    +        else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    +        {
    +            if ([UIScreen mainScreen].scale == 1) imageName = [imageName 
stringByAppendingString:@"-700"]; // iPad 2
    --- End diff --
    
    you can avoid this if, you are appending -700 in both cases


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to