不知道我的iphone能不能用retina

在iphone5中测试应用。

复制了一张图片,名为image1.png 和 image1@2x.png,在iphone5中实验,部分代码:

UIImage *myImage = [UIImage imageNamed:@"image1.png"] ;

CGFloat imageWidth = myImage.size.width;
CGFloat imageHeight = myImage.size.height;

NSLog(@"image %f %f", imageWidth,imageHeight);

CGRect screenBound = [[UIScreen mainScreen] bounds];
CGSize screenSize = screenBound.size;
CGFloat screenWidth = screenSize.width;
CGFloat screenHeight = screenSize.height;
NSLog(@"screen %f %f", screenWidth, screenHeight);

运行之后我在控制台看见

2013-04-05 13:13:48.386 Vallabici[2413:907] image 320.000000 57.000000
2013-04-05 13:13:48.389 Vallabici[2413:907] screen 320.000000 568.000000

没有用retina,用的是普通屏幕。

应该怎么办?

在retina设备中图片的尺寸不会变,变的是规模,添加下面的log

NSLog(@"scale %f", myImage.scale);

bounds 返回屏幕的点数尺寸,不是像素。

参看documentation

相同的还有size

我估计用不了
http://www.ztwshop.com

http://www.xtrons-store.com
http://www.sunraysat.com
http://www.hobbywingstore.com
http://www.keruistore.com
http://www.hikvisionstores.com
http://www.hikvisionstores.com
http://www.naviskautostore.com