I have long across many questions and answer regarding element settings for old and new iphone screens and got some idea as well. I have a query...I am preparing an app for iphone 320X480(iPhone), iphone retina 3.5 inch and 4 inch retina screens. For an instance of window (background) which I want to set programatically. It has to with a titlebar. so what I have done so far checked the screen size with
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
if ([UIScreen mainScreen].scale == 2.f && screenHeight == 568.0f) {
UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"[email protected]"]];
[self.view addSubview:backgroundImage];
[self.view sendSubviewToBack:backgroundImage];
} else {
UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Do.png"]];
[self.view addSubview:backgroundImage];
[self.view sendSubviewToBack:backgroundImage];
}
First block would check for iphone 5 screen (I presume) and second would set screen for normal and retina both screen for which I put 320X480 px image name Do.png and 640X960 image name [email protected]. The iphone and iphone 3.5 (Retina) displays well on simulator however iphone 4 (Retina) which I presume will be equal to iPhone 5 does not displays correctly. Please let me know what should i do...and yes [email protected] is 640X1136....