I have the location of an image in a .plist file. it is stored in a string.
I also have a UIImageView that i believe to be linked properly.
But i cannot display my image.
Here is my code (based on apple's drilldownsave):
LeafViewController.m
#import "LeafViewController.h"
@implementation LeafViewController
@synthesize listContent, leafViewController, imageView;
- (void)dealloc
{
[imageView release];
[listContent release];
[leafViewController release];
[super dealloc];
}
- (UIImageView *)newImageFromResource

int)indexPath;
{
NSDictionary *item = (NSDictionary *)[listContent objectAtIndex:indexPath];
NSString *imagePath = [[NSBundle mainBundle] pathForResource

NSString *)[item objectForKey:@"icon"] ofType:@"png"];
UIImage *image = [UIImage imageWithContentsOfFile:imagePath];
return image;
}
@end
LeafViewController.h
#import <UIKit/UIKit.h>
@interface LeafViewController : UIViewController
{
IBOutlet UIImageView *imageView;
IBOutlet LeafViewController *leafViewController;
NSArray *listContent;
}
@property (nonatomic, retain) UIImageView *imageView;
@property (nonatomic, retain) NSArray *listContent;
@property (nonatomic, retain) LeafViewController *leafViewController;
@end
THANK YOU IN ADVANCE FOR HELPING