Hi,
I'm using a piece of code I have used several times before to load an image into a UIImageView
- (void)viewDidLoad {
[super viewDidLoad];
UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"1" ofType:@"png"]];
[self.imgWeather setImage:img];
}
For some reason I get a SIGABRT when I hit [self.imgWeather setImage:img];
The image and UIImageView seems to be initialized correct.
Any idea what's going on?
[EDIT]
It seems to be crashing when I setImage to nil. Not good. I just looked at the stackTrace and can see a 'doesNotRecognizeSelector' exception:
#9 0x02554651 in objc_exception_throw ()
#10 0x0240842b in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#11 0x02378116 in ___forwarding___ ()
The imgWeather is defined as:
@property (nonatomic, retain) IBOutlet UIImageView *imgWeather;
any idea what this mean?