How can I animate UILabel to disappear like the text would be cleaned from blackboard? The animation is like hiding pieces of text rectangle with couple shape animations. Is it possible with Core Animation? I don't really want OpenGL.
A:
You can rotate the mask
property of your UILabel
's layer
between different states of your prerendered "clear" animation.
rpetrich
2010-10-25 08:11:30
Could you please elaborate more on 'prerendered' part?
Michael
2010-10-26 00:27:53
For each frame in the animation, create a mask image representing that stage of the animation. First frame would be completely opaque; last frame would be completely transparent; in between frames would have various amounts of the blackboard erased.
rpetrich
2010-10-26 02:33:26
and to make actual animation in mask, have some timer and change `contents` on each tick or there is a better way?
Michael
2010-10-26 02:48:57
If you want to use a UILabel, yes. You could generate the mask images at runtime, but that will could be slow
rpetrich
2010-10-26 15:18:21
Also, don't change `contents`. Change `mask`.
rpetrich
2010-10-26 20:52:42