如何激活@ 2x高分辨率图形以进行视网膜显示? [英] How to activate @2x high res graphics for retina display?
问题描述
我有一个旧应用,并为其创建了@ 2x高分辨率图像.现在,我将所有这些内容都整合到了我的项目中,但是当我在视网膜显示测试设备上构建并运行该应用程序时,看不到高分辨率图像.
I have an old app and created @2x high res images for it. Now I've incorporated all these into my project, but when I build and run the app on the retina display test device I do not see the high res images.
可以肯定的是,我用奇怪的颜色制成了其中的一些,所以我确切地知道是否使用了@ 2x.我还尝试先清理我的构建和所有目标.似乎该设备拒绝使用高分辨率图像.
To be sure, I made some of them with strange colors so I know exactly if @2x is used or not. I also tried to clean my build and all targets first. It just seems the device is refusing to use high res images.
我必须在info.plist中设置一个标志吗?
Must I set a flag in the info.plist?
推荐答案
这是imageWithContentsOfFile:
的已知问题.在API文档中,它说它应该可以工作,但实际上却不起作用(在4.0.x中不起作用,不确定较新的版本).他们有一天会修复它.
it's a known issue with imageWithContentsOfFile:
. In API docs, it says it should work, in reality it doesn't (didn't work in 4.0.x, not sure about newer). They'll fix it one day.
Apple bug: http://openradar.appspot.com/8160592
Apple bug: http://openradar.appspot.com/8160592
丑陋,但是一个很好的解决方法: http://hi.baidu.com/myguru/blog/item/11d12587e7c92524c65cc3ad. html
Ugly, but a good workaround: http://hi.baidu.com/myguru/blog/item/11d12587e7c92524c65cc3ad.html
这篇关于如何激活@ 2x高分辨率图形以进行视网膜显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!