I have an iOS project that uses a bunch of images in a single UIView
I have created the view in Interface Builder in put it all the appropriate subview (UIImageViews, UIButton, etc)
I 开发者_运维知识库want to use an image in my project's resources in the IB, but IB only seems to know about images that were added explicitly. If I add a whole folder to the resources in XCode, IB doesn't know about them,
However, if I drag the files themselves in, IB will find them.
The problen is, I have all my images arranged nicely in folders, and I don't want to have to drag each new image into XCode. XCode even has an option to create folder references that will load anything in those folder automatically.
How do I get IB to work with images added that way?Put the folder with your images into your project folder, then drag your folder into xcode. When it asks if you want to add them to the folder make sure you UNCHECK copy items into destination group's folder, as you have already put them there. That should keep your subfolder organization and give you access to all the files.
精彩评论