I wish to update a UILabel
at the exact moment that a UIImageView
animation stops playing.
My attempt at this has been to use -
[self performSelector:@selector(updateLabels) withObject:nil afterDelay:imageView.animationDuration];
Where updateLabels
is the the method that updates the labels.
This does not work for the first couple of animations. However, it does work after the first 3 or 4 times it has been played.
I am using imageNamed
to fill the NSArray
that holds the images for the animations. And from my research I have noted that imageNamed
caches the objects. So I am assuming that the lag on the first 3 or 4 runs is due to the lag off the cache.
Is there anyway to overcome this? (Preferably without changing from using imageNamed
, as I said it is working fine on all other animation cycles after the first 3 or 4).