adding images to app bundle permanently

蓝咒 提交于 2021-02-11 15:17:52

问题


I am adding some images that I need to use in my app in Supporting Files folder(Xcode 4.3). But when I transfer that code to some other machine(like to my supervisor) those images are not available as in I have only their names displayed in red color in that list. How can I add them permanently?


回答1:


In the add files windows, and after you select the images, make sure that distination check box is selected, this check box indicate whether you want to copy the selected items into distention group folder, or just you want a reference to these items

so select the check box, and this will copy the items to application bundle permanently




回答2:


The red simply means that XCode can't find the images.

Just because a file appears in a group in Xcode doesn't mean that it's in the same folder as other files in the group :(

I would suspect that you've added images to the group that are somewhere else on your machine. You've then given your boss a copy of your app's folder but that folder doesn't contain those images!

You can see where the files are located in the right hand side inspector when you click on them in XCode.




回答3:


Put/Copy your images inside xcode's project folder (/Users/SomeUser/mySuperProject/) and then add the images to your project (Supporting Files Group or another group).After that u can use this project anywhere.



来源:https://stackoverflow.com/questions/11524049/adding-images-to-app-bundle-permanently

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