0

Now I am on Three20.. I am using Two image source for loading image..That means

One Type of image from LOcal folder.ie from application folder Other is from url.. My problem is i dont know how to load image from local folder..and display it...

My code is given below...

 BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:mpngPath];
    if(fileExists==YES)
    {

        NSLog(@"image is present");

        //load and display??


    }


    else {
        NSLog(@"image is  not present");
              }
Alex Terente
  • 12,006
  • 5
  • 51
  • 71
sai
  • 479
  • 10
  • 30

2 Answers2

0

Like this:

[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"filename" ofType:@"png"]];
adam
  • 22,404
  • 20
  • 87
  • 119
0

Replace the url with your photo path. I assume that you save your images in your document directory.

 [NSString stringWithFormat:@"documents://%@",yourPhotoName];
Alex Terente
  • 12,006
  • 5
  • 51
  • 71