Re: specifying images for image views in nibs
Re: specifying images for image views in nibs
- Subject: Re: specifying images for image views in nibs
- From: Keary Suska <email@hidden>
- Date: Tue, 27 Nov 2012 09:16:57 -1000
On Nov 27, 2012, at 7:26 AM, Steve Mills wrote:
> How do I specify that an image view in a nib should use an image that's in a subfolder of a subfolder of the Resources directory in the bundle? Below is the hierarchy of the built app bundle. mixer.xib wants to use background.png in one of its image views.
>
> Resources/
> English.lproj/
> mixer.xib
> images/
> mixer/
> background.png
>
> Additionally, the source code hierarchy is different than how it appears in the built app bundle.
>
> rsrc/
> English.lproj/
> mixer.xib
> macrsrc/
> images/
> mixer/
> background.png
>
> If I simply choose "background" from the list of "known" images in the Interface Builder inspection panel, I see the image in Interface Builder. But when I build and run the app, the image does not appear. I've tried typing in a specific partial path "images/mixer/background" and "images/mixer/background.png", but neither of those worked. What are the rules? I can find no documentation about this. When should the extension be given? So many questions - so little documentation.
IMHO, you will find more happiness with Xcode when your "build" and "built" directory structures are the same. If not you will have the exact problems you are experiencing. I expect that Interface Builder is hard-coding paths as this is far more efficient than searching for every resource at runtime.
The alternative is to set the resources via code at runtime, which is far less convenient.
HTH,
Keary Suska
Esoteritech, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden