• 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: Loading an image contained in a custom framework ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading an image contained in a custom framework ?


  • Subject: Re: Loading an image contained in a custom framework ?
  • From: Steve Shepard <email@hidden>
  • Date: Fri, 26 Aug 2005 14:29:45 -0700

You could do something like

NSBundle *frameworkBundle = [NSBundle bundleWithIdentifier:frameworkIdentifier];
NSString *imagePath = [frameworkBundle pathForResource:@"your image
name" ofType:@"tif"];
NSImage *myImage = [[NSImage alloc] initWithContentsOfFile:imagePath];

where frameworkIdentifier is the CFBundleIdentifier listed in the
framework's plist.

-Steve

On 8/26/05, Eric Morand <email@hidden> wrote:
> Hi List !
>
>
>
> I have made a custom framework and for some objects, I have obviously
> the need to load some tiff image (for instance, I have a custom
> NSTableView with a corner view that draw a tiff image). The problem
> is that while my images are included in the framework (I can see them
> when I explore my framework via the Finder), I can't load them with +
> (NSImage *)imageNamed.
>
> What is the dedicated method to load an image that is NOT included in
> the main bundle ?
>
>
>
>
> Thanks,
>
>
> Eric.
>  _______________________________________________
> 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
>
 _______________________________________________
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

  • Follow-Ups:
    • Re: Loading an image contained in a custom framework ?
      • From: j o a r <email@hidden>
References: 
 >Loading an image contained in a custom framework ? (From: Eric Morand <email@hidden>)

  • Prev by Date: Re: Loading an image contained in a custom framework ?
  • Next by Date: Re: Loading an image contained in a custom framework ?
  • Previous by thread: Re: Loading an image contained in a custom framework ?
  • Next by thread: Re: Loading an image contained in a custom framework ?
  • Index(es):
    • Date
    • Thread