okay say I have a round rect button and an action method connected to it -(IBAction)btnclicked:(id)sender
. When the button is pressed, it fires an animation. I used this in the action method I mentioned above--imageview.animationImages = images;
. Here imageview
is a pointer to UIImageView object and images
is an array of images. Now what I want is that the button should remain disabled while the animation is going on. For that I tried this:
if (imageview) {
btn.enabled = NO;
}
This of course disables the button but how should I enable it back after the animation is over. I thought of using NSTimer
and disable the button for same time as animation but thats not a good method(its difficult to sync this timer with the animation). Besides, it also leaves the animation disabled after the animation is over. So please tell me if there is any good way to do what I'm trying? Thanks