- (void)viewDidLoad
{
NSString *homeDirectoryPath = NSHomeDirectory();
NSString *imagePath = [homeDirectoryPath stringByAppendingString:@"/graph.png"];
NSLog(@"Image: %@", imagePath);
if (![[NSFileManager
defaultManager] fileExistsAtPath:imagePath isDirectory:NULL])
{
UIImageView * myImageView = [[UIImage alloc] initWithContentsOfFile: imagePath];
//[[NSFileManager defaultManager] createDirectoryAtPath:imagePath attributes:nil];
[self.view addSubview:myImageView];
[myImageView release];
}
[super
viewDidLoad];
}
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f);UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"myImage.png"]];
myImage.opaque = YES; // explicitly opaque for performance
[self.view addSubview:myImage];
[myImage release];