0

I simply want the .png to stay after this animation. It successfully shows the first image, then transitions to the next, however after a duration of 6 seconds, it disappears.

- (void)viewDidLoad {
[super viewDidLoad];
NSArray *animationArray=[NSArray arrayWithObjects:
                         [UIImage imageNamed:@"newblue.png"],
                         [UIImage imageNamed:@"blackbox.png"],
                         nil];
UIImageView *animationView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0,320, 460)];
animationView.animationImages=animationArray;
animationView.animationDuration=6.5;
animationView.animationRepeatCount=1;
[animationView startAnimating];
[self.view addSubview:animationView];

// Do any additional setup after loading the view, typically from a nib.
}
user3233623
  • 383
  • 3
  • 13
  • possible duplicate of [Fade/dissolve when changing UIImageView's image](http://stackoverflow.com/questions/7638831/fade-dissolve-when-changing-uiimageviews-image) – axiixc Jan 26 '15 at 22:08

1 Answers1

1

Set the image property of the UIImageView to the image you want to persist on screen.

animationView.image = [UIImage imageNamed:@"blackbox.png"];
influxd
  • 526
  • 3
  • 8