I am trying to implement using Images.xcassets into a project I am working on. From what I understand I can just put all the different sized images for different devices in there and then call [UIImage imageNamed:@"name_of_image_set"] and it will return the correct image for the device I am working on.
It seems to be pulling the correct image for everything except the iPhone 5/5s/5c with the 4" screen. For that screen size it gives me the image for the @2x iPhone with the 3.5" screen.
Here is the json that is included in the folder with the images.
{
"images" : [
{
"idiom" : "iphone",
"scale" : "1x",
"filename" : "bg.png"
},
{
"idiom" : "iphone",
"scale" : "2x",
"filename" : "bg@2x.png"
},
{
"idiom" : "iphone",
"filename" : "bg-568h@2x.png",
"subtype" : "retina4",
"scale" : "2x"
},
{
"idiom" : "ipad",
"scale" : "1x",
"filename" : "bg~ipad.png"
},
{
"idiom" : "ipad",
"scale" : "2x",
"filename" : "bg@2x~ipad.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Everything seems to be in order, am I just misunderstanding how xcassets are supposed to work?
Thanks
Joel Bell