【发布时间】:2010-08-10 11:40:06
【问题描述】:
我有以下代码:
- (void)viewDidLoad {
NSString *homeDirectoryPath = NSHomeDirectory();
NSString *imagePath = [homeDirectoryPath stringByAppendingString:@"/graph.png"];
NSLog(@"Image: %@", imagePath);
if (![[NSFileManager defaultManager] fileExistsAtPath:imagePath isDirectory:NULL])
{
graph = imagePath;
//[[NSFileManager defaultManager] createDirectoryAtPath:imagePath attributes:nil];
}
'graph' 被定义为 UIImageView。我正在尝试在路径“imagePath”中显示文件。我知道代码图 = imagePath 不正确,因为变量 'imagePath' 表明它包含图像的路径。
如何显示位于特定图像路径的图像?
问候, 斯蒂芬
【问题讨论】:
标签: iphone xcode uiimageview