I have a background image covering the entire screen in my app, with a little bit extra on the sides for a parallax effect. Since i support older phones, i need to have logic that checks size bounds to select the "short" or "long" image (4 -> 5). Now with the new phones i need even more logic.
I have made a method that works, but it's not exactly "adaptive"... i am wondering if i have missed something that might bite me. (apart from that i obviously have to revisit this when there are new resolutions coming out...)
App doesn't support landscape mode right now. I have a "regular" image to cater for 3gs/4/4s with @2x that is the default setting, and in ViewDiwLoad of my rootcontroller i run this code, which i've tested and it works:
if (screenBounds.size.height == 568) {
backg.image = [UIImage imageNamed:@"background660x1156.png"];
}else if (screenBounds.size.height == 667) {
backg.image = [UIImage imageNamed:@"background770x1334.png"];
}else if (screenBounds.size.height > 667) {
backg.image = [UIImage imageNamed:@"background1262x2228.png"];
}
Should i do this in a different way?