Here is some code I struggle with for a while.
If you start the fade in animation, the label text fades in. If I start the fade out animation the the label text fades ou
The easiest way would be to use:
[UIView animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion]
and add the fadeOut
call to the completion
block. The documentation might help answer any questions you have.
If you can't use the block version for some reason, then you'll have to set a delegate ([UIView setAnimationDelegate:(id)delegate]
) and a selector with ([UIView setAnimationDidStopSelector:]
) that the delegate will respond to.
Again, see the documentation for more details.