2010-08-30 101 views
0

我在iPhone应用程序中使用了ios 4.0的新Retina显示功能。 我使用命名约定将图像更高分辨率添加为[email protected]到我现有的图像文件夹。iphone OS 4.0-显示更高分辨率图像的问题

例如。我以下面的方式添加图像:

UIImageView * toolBarBg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,88)]; NSString * toolBarBgImgPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@“bg_btm_bar.png”];

[toolBarBg setImage:[UIImage imageWithContentsOfFile:toolBarBgImgPath]]; 

我在图片文件夹中也有名为“[email protected]”的图片。

但是当我运行我的应用程序时,它没有采用更高分辨率的图像。

我不理解如何让应用程序使用更高分辨率的图像。 请帮我一把!

回答

0

使用imageNamed:而不是imageWithContentsOfFile: