My UIView does a simple animation. He adjusts his position y from 100 to 130, and then changes direction. I want it to keep repeating, so I have a repeat counter set to 999. After user input, I want to take the same UIView and adjust the x position. This is done using another UIView animation. The problem is that when the second animation starts, the first animation (which goes from 100 to 130 in the y direction) just ends abruptly (since I read that it should). Is there a way to get the final position of the y coordinate of this UIView before it ends? Ideally, I would like the UIView to stay in the same y position it was in when I translated the x coordinates.
Summary: UIView moves in the y direction from 100-130, reverses and repeats until user input is received. After receiving, the animation is trimmed, and UIView goes to y = 130. I would like to know what the final y value is before the animation was interrupted, so when using a new animation using x-translation, UIView will not jump to 130, but will remain the same position in which he was when the 1st animation is completed.
I donβt seem to see anything that would allow you to do this. It seems to me that after you set the animation in motion using UIView, it (and all current state changes) got out of your hands and will only be βreturnedβ to your control and accessibility after the animation is completed, and to the designated end point. It's right? Any insight would be appreciated. Thank you for your time.
source share