views:

164

answers:

1

Am I missing something about the @2x graphics on the iPhone 4?

I'm running the 4.0.2 SDK in the iPhone Simulator, but UIScreen has a scale of 1.0, isn't it supposed to be 2.0 and load high res images automatically?

here's what's I'm testing:

 NSLog(@"system version: %@", [[UIDevice currentDevice] systemVersion]);
 NSLog(@"scale factor: %.1f ", [[UIScreen mainScreen] scale]);

and it prints:

system version: 4.0.2

scale factor: 1.0

Is it a problem in the Simulator? Or I miss some magical key that I need to enable to make the UIScreen allow 2x graphics?

+3  A: 

Are you using the iPhone 4 simulator?

Hardware -> Device -> iPhone 4.

The scale depends on the device, not the OS version.

Jerry Jones
10x Jerry, I somehow missed this option ... Interesting XCode starts by default the iPhone 3 Simulator, even though my version of XCode does not support ANY iPhone 3.x.x SDK ... gosh ..
Ican Zilb
Remember, it's DEVICE we are talking about here. You can still run the 4.0 OS on an old generation iPhone.
Jerry Jones
Aye: Hardware version != software version.
Wevah