Re: Adding an image to a NIB file
Re: Adding an image to a NIB file
- Subject: Re: Adding an image to a NIB file
- From: Jerry Krinock <email@hidden>
- Date: Tue, 04 Oct 2005 10:42:34 -0700
- Thread-topic: Adding an image to a NIB file
on 05/10/04 09:36, Paul J. Lucas at email@hidden wrote:
> So I try dragging an image into the "well" of an image view in
> a window of a NIB file I'm working in Interface Builder on and
> it complains that I need to add the image to the project. What
> project? An Xcode project? I'm just editing a NIB file.
> There is no project. I'm writing Cocoa code that's called via
> JNI for a Java project that't built with ant -- not Xcode.
>
> How can I add an image to a window in Interface Builder without
> a project?
Yes, that error message is really stupid, and I too was quite frustrated
when I first saw it. Ignore it. Here is how to link an NSImage to an image
file:
1. In Interface Builder, select the NSImage.
2. Type cmd-shift-I to bring up the inspector.
3. Type cmd-1 to show the "Attributes" pane.
4. In the "Image:" field, fill in the filename of the image file, but do
not fill in the filename extension. For example, for "myPic.png", fill in
"myPic".
5. In Xcode or Codewarrior, drag myPic.png so it gets copied into the
Resources folder of your application's package.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden