Do I still need low-resolution images for using Interface Builder when developing iPhone app for iOS 7?

与世无争的帅哥 提交于 2020-01-01 08:46:26

问题


I started to develop an iPhone app for iOS 7.

Since iOS 7 does not support devices with non-retina display for the iPhone/iPod touch, and it uses high-resolution images on non-retina iPads (iPad 2 and iPad mini) in the iPhone emulation mode, now I think we don't need to provide low-resolution images when developing an iPhone-only app which deployment target is iOS 7.

I thought it's great, but soon I faced a problem when I used a Storyboard; apparently Interface Builder can not display high-resolution images which file names end with @2x.

I feel it's really pity that we have to provide the low-resolution images ONLY for the Interface Builder...

Is there any good workaround for this? Or do we still have to provide low-resolution images if we want to use the Interface Builder?


回答1:


You are correct that an iOS 7 iPhone-only app is not going to run on any single-resolution devices, so you only need to provide double-resolution images. Do what you have always done in the past: refer to your image as myImage but name the actual image file myImage@2x.png. Even better, use the asset catalog! Place the double-resolution image in the 2x slot and refer to it by the name of that image set. Either way, this will work perfectly both in the storyboard editor and in the running app; in the storyboard editor, the Media Library and things like buttons that have images will display your image's name as myImage.



来源:https://stackoverflow.com/questions/20602267/do-i-still-need-low-resolution-images-for-using-interface-builder-when-developin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!