code 7: How to replace an image by another by clicking a button? : I started Xcoding a few days ago and get stopped by the following problem: image does not change by clicking. The former image disappears.
Thanks for any help, Peter

ViewController.h
#import <UIKit/UIKit.h>

@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIImageView *imgView;
- (IBAction)changeImage:(id)sender;
@end

ViewController.m
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

@synthesize imgView;

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)changeImage:(id)sender {
    UIImage *img = [UIImage imageNamed:@"animal_3.png"];
    [imgView setImage: img];}
@end
