views:

19

answers:

1

I have downloaded the image from ftp server ,the downloaded images are stored in hard disk , i want to locate those images files in my ImageView .

+1  A: 

If this image will be bundled with your application, put it in the resource folder of you XCode project and add it to the main target. When done, you can load your setup the UIIMageView with :

myImgView.image = [UIImage imageNamed:@"mydownloadedimage.png"]

If the image should not be bundled with your App (i.e. because the image is downloaded by the application at runtime), it will probably ends in your document folder that you can access using :

NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* documentFolder = [paths objectAtIndex:0];

then you can load the image using :

myImageView.image = [UIImage imageWithContentsOfFile:[documentFolder stringByAppendingPathComponent:@"mydonwloadedimage.png"]];

Good luck

VdesmedT
thank u very much
muthiah