how to get the path and url of the temp image ?

Discussion in 'Mac Programming' started by xiaohuli170, Feb 12, 2009.

  1. macrumors newbie

    Joined:
    Jan 13, 2009
    #1
    I capture a image of webview that playing a flash. Because I want to show this image and use the IKSaveOptions to save the image .but I found the path of image is nil, Now I want to get the path of image , How to do ?
    my code:
    NSString *path = [[NSBundle mainBundle] pathForResource: ?? ofType:??];
    NSURL *url = [NSURL fileURLWithPath: path];
    then I use the url to show the image in the imageview,but Now I didn't get the path ,Thanks a lot!
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    pathForResource:eek:fType: returns the path of an image in the Resources folder within your application's bundle. Is this where your image is stored? If it's where you want it to be stored, make sure it's listed under the target's Copy Bundle Resources group in Xcode.
     

Share This Page