Search code examples
objective-ccocoamacosnsbundlenscursor

how to get images from other frameworks?


I would like to have a my cursor with the same shape as in Lion

So Instead of having this: NSCursor icon

I would like to have this:NSCursor in Lion

Which can be found at: System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors/resizeeastwest/cursor.png in the new OSX 10.7 GM

Is there a way I can load that image using methods from NSBundle or so? I would like to have not the same image into my application (as a resource) if I can use the image from the system.


Solution

  • I ended up by copying the resources into my project and access them the usual way

    NSImage *cursorImg = [NSImage imageNamed:@"cursor.png"];
    

    This seem to be the safest way.