I am not ignorant of how many questions exist around the topic, I've read most and haven't been able to find a straight answer to what should be a common thing to do.
How does one handle full screen sized images on on different phone sizes?
Current strategy:
I'm using vectors so the idea is to create 3 vectors (PDF) in 3 different image assets:
- Name: mypicture-320 Size: 320 x 568
- Name: mypicture-375 Size: 375 x 667
- Name: mypicture-414 Size: 414 x 736
Then when I want to get the image i'll do something in code like (pseudo code):
if iPhone5 {
return mypicture-320
}
else if iPhone6 {
return mypicture-375
}
else if iPhone6Plus {
return mypicture-414
}
This feels wrong, like there should be a better way by now using only xcassets. Am I missing something?
Related question: If I chose not to use vectors then I'll need the following images:
- Name: mypicture-320 Scale:@2 ActualSize: 640 x 1136
- Name: mypicture-375 Scale:@2 ActualSize: 750 x 1334
- Name: mypicture-414 Scale:@3 ActualSize: 1242 x 2208
Calling them in the same way as described earlier.