I am loading image with text in my ViewController. The text loads and it's fine but the image doesnt.
Here is how I load them in my ViewController:
- (void)viewDidLoad {
[super viewDidLoad];
self.backgroundImageView.image = [UIImage imageNamed:@"tut_1.jpeg"];
self.titleLabel.text = self.titleText;
NSLog(@"%@", self.backgroundImageView);
NSLog(@"%@", self.backgroundImageView.image);
NSLog(@"%@", self.titleLabel.text);
}
The output of the NSLogs is "some text" for the self.titleLabel.text and NULL for the self.backgroundImageView.image.
Strange because NSLog of self.backgroundImageView
is not NIL but:
UIImageView: 0x14deaffb0; frame = (0 0; 240 128); autoresize = RM+BM; userInteractionEnabled = NO; layer =
The image tut_1.jpeg
exits and the name is written correctly.
I also have the correct outlet referencing in my header file by dragging from the interface builder:
tut_1
and nottut_1.jpeg
– Randy