Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animate UIButton with animationImages changes button state fade after animation completion

I am animating UIButton with animationImages and its animating successfully, but after animation completion the UIButton fade out automatically. How can i avoid the fade out?

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];
like image 491
Moeen Arif Avatar asked Nov 09 '22 08:11

Moeen Arif


1 Answers

I got the solution, actually there are is a property Associated with UIButton called Disabled Adjust Image, I just uncheck and it did the trick.

enter image description here

like image 107
Moeen Arif Avatar answered Nov 14 '22 23:11

Moeen Arif