In your .h file (if the UIImageView is not in interface builder), change the property declaration to:
@property (nonatomic, strong) UIImageView *imageView;
You could take out the strong
and leave it as (nonatomic)
, but if you're unfamiliar with weak vs. strong, it's good for reference. If you were to leave it as weak, the object would get released immediately after assignment within this view controller since there would be no other strong pointers to it.
If the UIImageView was not set up in interface builder, then you need to create it in the implementation:
- (void)viewDidLoad
{
_imageView = [[UIImageView alloc] init];
...
}
If this isn't the case, then make sure your capitalization, spelling, etc. is correct when referencing the images and that all images are added to the application target in your project settings.