views:

16

answers:

1

I have the following path in NSString *path1,

/Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/snook.jpg  

How can I show the image snook.jpg. I need it to show in UITableViewCell for

cell.imageView.image   

if path1 has the path. I used the following to get the last part of the path1 , snook.jpg.

NSURL *url = [NSURL URLWithString:path1];
NSString *imageString = [url path];

But, url is showing as nil.
How can I do it ? Thank you.

+1  A: 

If you have the path then you can use the "imageWithContentsOfFile:" method of UIImage:

UIImage *img = [UIImage imageWithContentsOfFile:path];
cell.imageView.image = img;
Laurent Etiemble