How can I get notified for each frame in Core Animation?
I have a program for the iPhone, which consists of several UIView
that sit on top of another UIView
, and which can be moved. I am drawing connections between UIView
using a method drawRect:
in the containing UIView
. Everything works fine.
The only problem is when I use animation to move views, the background is not updated. I have tried using observing key values in the properties of the views, but I am not getting notified when they change during animation.
Is there a way to make my containing UIView
repaint during animation?
a source to share
I don't believe this exists for CAAnimation. There's a way to do it with NSAnimation on a Mac, but there is no equivalent that I know in CAAnimation. Nevertheless....
The best solution for this would probably be to set up the connections themselves on the CALayers and animate them just like you animate UIViews, with each connection being drawn by itself rather than being outputted by the supervisor. I would do it like this on a Mac even with NSAnimation.
a source to share