• 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: Finding an image like [NSImage imageNamed:] but not in bundle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding an image like [NSImage imageNamed:] but not in bundle?


  • Subject: Re: Finding an image like [NSImage imageNamed:] but not in bundle?
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 15 Jun 2001 10:32:46 -0700

On Thursday, June 14, 2001, at 05:23 PM, Matt Ridley wrote:

Is there a way I can get this nice imageNamed functionality for images
outwith the bundle, without having to manually loop through all possible
image file-extensions using stringByAppendingString:@".tif", and so on?

NSImage.h defines a method on NSBundle, pathForImageResource:, that should do what you want. Create a bundle corresponding to the directory of interest, then call this method with the name.

Douglas Davidson


References: 
 >Finding an image like [NSImage imageNamed:] but not in bundle? (From: Matt Ridley <email@hidden>)

  • Prev by Date: AltiVec in Performance PDF
  • Next by Date: Re: Cocoa/EOF for non-enterprise apps Re: proof of cocoa
  • Previous by thread: Finding an image like [NSImage imageNamed:] but not in bundle?
  • Next by thread: Can't archive NSData :-(
  • Index(es):
    • Date
    • Thread