I am animating a UIButton with animationImages and its animation is successful, but after the animation UIButton automatically disappears. How can I avoid extinction?
sender.imageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:[NSString stringWithFormat:@"main_bird_animation_01%@",ipadVar]], [UIImage imageNamed:[NSString stringWithFormat:@"main_bird_animation_02%@",ipadVar]], [UIImage imageNamed:[NSString stringWithFormat:@"main_bird_animation_03%@",ipadVar]], nil]; sender.imageView.animationDuration = 1.f; sender.imageView.animationRepeatCount = 4.f; [sender.imageView startAnimating];
source share