I created an app that is compatible for iOS 5 and pre iPhone 5. Meaning, its background and sprites positioning are the way they are supposed to for the iPhone 3.5 Retina. When I tried running my app on the iPhone 4″ Retina, I see black padding on the top and bottom of my app. I was trying to find a smart way to conditionally display different background and sprite positioning given the size of the screen. I tried these two ways and they are not returning the value that I expect….
NSLog(@"Win Height: %f", winSize.height);
NSLog(@"Win Width: %f", winSize.width);
NSLog(@"Main Screen Height: %f", [UIScreen mainScreen].bounds.size.height);
NSLog(@"Main Screen Width: %f", [UIScreen mainScreen].bounds.size.width);
2012-10-02 21:36:47.317 Win Height: 480.000000
2012-10-02 21:36:47.318 Win Width: 320.000000
2012-10-02 21:36:47.319 Main Screen Height: 480.000000
2012-10-02 21:36:47.319 Main Screen Width: 320.000000
Does anyone know a way to conditionally position sprite given the size of the device?
Have you included the Default-568h@2x.png splash image to disable letterboxing?
Once that is done you could do something like this,
Edit: Forgot the @2x