I am trying to perform an animation on a UIView and evaluate its current position at various times during the animation.
I can perform the animation ok, but I cannot get any discreet data on the center position. I have discovered that when the animation block is initiated the center position is immediately assigned the end position in the animation block command. Here is the iOS 4.0 block code:
[UIView animateWithDuration: 3.0 delay: 0
options: UIViewAnimationOptionCurveEaseOut
animations:^{
mainView.center = CGPointMake(160.0, -1800.0); }
completion:NULL];
As I mentioned, the code runs ok, but any time during the view animation the center point always reads as -1800 even though the view itself has not yet reached that position.
Is there a way to evaluate the view's real position at various times during it's animation?
I can perform the animation ok, but I cannot get any discreet data on the center position. I have discovered that when the animation block is initiated the center position is immediately assigned the end position in the animation block command. Here is the iOS 4.0 block code:
[UIView animateWithDuration: 3.0 delay: 0
options: UIViewAnimationOptionCurveEaseOut
animations:^{
mainView.center = CGPointMake(160.0, -1800.0); }
completion:NULL];
As I mentioned, the code runs ok, but any time during the view animation the center point always reads as -1800 even though the view itself has not yet reached that position.
Is there a way to evaluate the view's real position at various times during it's animation?