CB-10263 Fix splashscreen plugin filenames for Asset Catalog
Github: close #69
This commit is contained in:
parent
1e67606c60
commit
d7841c7ec9
@ -23,6 +23,7 @@
|
||||
typedef struct {
|
||||
BOOL iPhone;
|
||||
BOOL iPad;
|
||||
BOOL iPhone4;
|
||||
BOOL iPhone5;
|
||||
BOOL iPhone6;
|
||||
BOOL iPhone6Plus;
|
||||
|
@ -156,6 +156,7 @@
|
||||
device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
|
||||
device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone);
|
||||
device.retina = ([mainScreen scale] == 2.0);
|
||||
device.iPhone4 = (device.iPhone && limit == 480.0);
|
||||
device.iPhone5 = (device.iPhone && limit == 568.0);
|
||||
// note these below is not a true device detect, for example if you are on an
|
||||
// iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but
|
||||
@ -187,7 +188,23 @@
|
||||
{
|
||||
imageName = @"Default";
|
||||
}
|
||||
|
||||
|
||||
// Add Asset Catalog specific prefixes
|
||||
if ([imageName isEqualToString:@"LaunchImage"])
|
||||
{
|
||||
if (device.iPhone4 || device.iPhone5 || device.iPad) {
|
||||
imageName = [imageName stringByAppendingString:@"-700"];
|
||||
} else if(device.iPhone6) {
|
||||
imageName = [imageName stringByAppendingString:@"-800"];
|
||||
} else if(device.iPhone6Plus) {
|
||||
imageName = [imageName stringByAppendingString:@"-800"];
|
||||
if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown)
|
||||
{
|
||||
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (device.iPhone5)
|
||||
{ // does not support landscape
|
||||
imageName = [imageName stringByAppendingString:@"-568h"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user