So just when I though my swift 2 upgrade could not get any worse its seems that you cannot add retina 4" 2x image assets anymore. I cannot fine any option anymore to add it, all my old assets still have the retina 4" image but I cannot create a new image set with a 4" retina image. Why?
Any ways to fix this?
Edit Contents.json
of the Image Set
and add
{
"idiom" : "iphone",
"subtype" : "retina4",
"scale" : "2x"
}
You will see appear Retina 4 2x
entry.
so I asked them again what we should do if we need to scale images precisely for the 4 inch retina screen.
"What is preventing you from being able to apply the special casing code whereby you check the device type and do something different for iPhone 5, 5s, 5c?
i.e.
if ([platform isEqualToString:@"iPhone5,1"]) return @"iPhone 5 (GSM)";
if ([platform isEqualToString:@"iPhone5,2"]) return @"iPhone 5 (GSM+CDMA)";
if ([platform isEqualToString:@"iPhone5,3"]) return @"iPhone 5c (GSM)";
if ([platform isEqualToString:@"iPhone5,4"]) return @"iPhone 5c (GSM+CDMA)";
if ([platform isEqualToString:@"iPhone6,1"]) return @"iPhone 5s (GSM)";
if ([platform isEqualToString:@"iPhone6,2"]) return @"iPhone 5s (GSM+CDMA)"
Have you filed a feature request for this ability yet? (using Apple Bug Reporter) "
Not really satisfied with the answer at all because I obviously know how to check what kind device is running my app/game.
How does that help me to add a image to my asset catalogue that is only used for the retina 4 inch screen? You know like I could do before without any issues at all. It seems beyond stupid to remove retina 4 inch assets, makes no sense to me.
Also in regards to the JSON tip for Giorgio, it still seems to work actually, i think my simulator on a iPhone 5 is just messed up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With