• 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
NSString and CFURLRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString and CFURLRef


  • Subject: NSString and CFURLRef
  • From: Hisaoki Nishida <email@hidden>
  • Date: Wed, 18 Jul 2001 04:48:08 -0400

Hi,

I am trying to send the URL for an image as an argument to a function that expects a CFURLRef. I can obtain the path for my image, but obviously I cannot send it to CGDataProviderCreateWithURL as an NSString. How can it obtain the CFURLRef version of path?


NSBundle *bundle;
CGDataProviderRef provider;
NSString *path;

bundle = [NSBundle bundleForClass:[self class]];
path = [bundle pathForResource:@"logo_yggdral" ofType:@"tiff"];
provider = CGDataProviderCreateWithURL( path );


Is there a way to directly obtain the URL for my image as a CFURLRef, or send the NSString to a CGDataProvider function that would accept an NSString?



Thanks,

Hisaoki N.


  • Prev by Date: Toolbars in sheets?
  • Next by Date: Re: Collection of Cocoa & objc questions from a "newbie"
  • Previous by thread: Toolbars in sheets?
  • Next by thread: API for adding dictionary to MacOS ?
  • Index(es):
    • Date
    • Thread