Cocoa touch 如何从UITAbleViewCell中的路径获取图像?

Cocoa touch 如何从UITAbleViewCell中的路径获取图像?,cocoa-touch,iphone-sdk-3.0,uitableview,uiimageview,uiimage,Cocoa Touch,Iphone Sdk 3.0,Uitableview,Uiimageview,Uiimage,我在NSString*path1中有以下路径 /Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/snook.jpg 如何显示图像snook.jpg。 我需要它在UITableViewCell中显示 cell.imageView.image 如果路径1具有路径。我使用下面的代码获取路径

我在NSString*path1中有以下路径

/Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/snook.jpg  
如何显示图像snook.jpg。 我需要它在UITableViewCell中显示

cell.imageView.image   
如果路径1具有路径。我使用下面的代码获取路径1的最后一部分snook.jpg

NSURL *url = [NSURL URLWithString:path1];
NSString *imageString = [url path];
但是,url显示为零。
我怎么做?
谢谢。

如果您有路径,则可以使用“imageWithContentsOfFile:”方法:

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