• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding Images to nib files in IB?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Images to nib files in IB?


  • Subject: Re: Adding Images to nib files in IB?
  • From: Amul Goswamy <email@hidden>
  • Date: Mon, 5 Jan 2004 13:23:37 -0800

Please make sure the project that nib belongs to is open in Xcode. Drag the image into the project or into Xcode and it should display in IB's Image tab. I verified that this does work. Try to quit all your tools (or restart) and try this again.

If it still does not work for you, there may be an hiccup in the communication between IB and Xcode. Please look at the console for any pertinent messages and email them to me or include them in a bug report on http://bugreport.apple.com.

-Amul


On Dec 28, 2003, at 10:39 AM, Kaelin Colclasure wrote:

Thanks Michael. I had never noticed that menu item in IB before. I've gotten accustomed to relying on Google in the past few years, which is reasonably definitive when you need a reference to open source or Java-related documentation. Now that I'm delving a bit deeper into Apple's technology I need to get re-accustomed to using documentation that comes bundled with the software... :-)

Incidentally, I had come close -- I'd tried using a tiff file instead of a gif, and I'd tried copying the gif into my project directory... Now I know that the file has to be in the project directory, and gif is not a supported image format.

-- Kaelin

On Dec 27, 2003, at 10:29 AM, Michael Scott wrote:

Did you check the Xcode Integration section of IB's FAQ? (Go to IB Menu Help/FAQ.)

 How do I get IB to display images from my project?

For Carbon nibs:

Make sure the project is open in Xcode. Add a compiled resource file containing your images to your Xcode project. Now open the nib. Carbon nibs will look inside compiled .rsrc files for PICT, icns, cicn and ICON resources. These esource files must have the extension .rsrc.

For Cocoa nibs:

Make sure the project is open in Xcode. Add your images to your Xcode project. Any images you add must have an extension understood by NSImage (.tiff, .jpeg, etc). Now open the nib.

General rules:

IB will only show images it can guarantee will exist at runtime, so make sure your images or resources are included in the target which contains the nib. If a nib belongs to multiple targets, it will only show images contained within every one of these targets.

On 27 Dec 2003, at 18:44, Kaelin Colclasure wrote:

This is exasperating! I tried a couple of different gif and png files I had available, and I get exactly the same results for each: the file is added to the Xcode project, but doesn't show up in IB. I am thinking that this is a bug...

I'm using Interface Builder 2.4.1 (v362), which I downloaded from ADC as part of the Xcode 1.1 release.

-- Kaelin

On Dec 26, 2003, at 8:30 PM, Hiro Fujimoto wrote:


Kaelin,

I wrote previous answer on my memory of older virsion of IB,
New I tried what you did on IB v2.4, It seems to work correctly, On dropping of GIF or JPEG
file icon (form Finder) , IB shows the icon in its images tab.
I think you should check you GIF file again and try other gif file.

hiro.

--


On 2003/12/27, at 13:14, Kaelin Colclasure wrote:

Hello Hiro,

I gave your suggestion a shot, but it did not get me any further. I first added my gif file to the Xcode project, and then dragged the file's icon from Xcode into Interface Builder's Images tab. Again, IB presented me with a sheet asking if I wanted to add the file to a target. It doesn't matter if I say yes or no, once I click Add (on the sheet) I get another copy of the gif in my Xcode project -- but still no icon for the image in IB. :-/

I'm using a full install of the recently release Xcode 1.1... Is it possible there's a bug?

-- Kaelin

On Dec 26, 2003, at 4:25 PM, Hiro Fujimoto wrote:

Kaelin,

You can place an imge into nib file after you add the image into your project file, by drag
& drop it from Xcode's project window not from Finder.

hiro fujimoto

--

On 2003/12/27, at 4:53, Kaelin Colclasure wrote:

How do I add an image resource to my nib file in Interface Builder? I tried simply dragging and dropping from the Finder onto the Images palette of the nib view, and this popped up a sheet which added a reference to my gif file to my Xcode project -- but the image still does not show up in the palette, and if I try to set is as the image of an NSImageView it shows a broken link icon.

-- Kaelin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: [WebKit] getting the size of the webFrame's contents
  • Next by Date: Re: New to cocoa/database
  • Previous by thread: Re: New to cocoa/database
  • Next by thread: Re: NSLayoutManagers and NSTypesetters and NSGlyphGenerators, oh my!
  • Index(es):
    • Date
    • Thread