You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2017/12/04 14:30:11 UTC

[GitHub] egorzp closed pull request #141: Iphone x splashes

egorzp closed pull request #141: Iphone x splashes
URL: https://github.com/apache/cordova-plugin-splashscreen/pull/141
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/ios/CDVSplashScreen.h b/src/ios/CDVSplashScreen.h
index ec5d6022..dcc0d779 100644
--- a/src/ios/CDVSplashScreen.h
+++ b/src/ios/CDVSplashScreen.h
@@ -28,6 +28,7 @@ typedef struct {
     BOOL iPhone6;
     BOOL iPhone6Plus;
     BOOL retina;
+    BOOL iPhoneX;
     
 } CDV_iOSDevice;
 
diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m
index ab97055a..6f6c4a4d 100644
--- a/src/ios/CDVSplashScreen.m
+++ b/src/ios/CDVSplashScreen.m
@@ -174,7 +174,7 @@ - (CDV_iOSDevice) getCurrentDevice
     // this is appropriate for detecting the runtime screen environment
     device.iPhone6 = (device.iPhone && limit == 667.0);
     device.iPhone6Plus = (device.iPhone && limit == 736.0);
-
+    device.iPhoneX = (device.iPhone && limit == 812.0);
     return device;
 }
 
@@ -283,7 +283,11 @@ - (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(i
             }
         }
     }
-
+    // return this image if device is IPnone X
+ 
+    if (device.iPhoneX) { // does not support landscape
+         imageName = @"LaunchImage-1100-Portrait-2436h@3x";
+    }
     return imageName;
 }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org