Good day all;
I have an UIImageView that I animate around a large UIView. The UIView is contained within a UIScrollView.
Now, with small movement animations of the UIImageView within the UIView, if it passes a certain thresh hold (gets close to the edge of the screen), I will manually scroll the UIScrollView to re-center the UIImageView. The code is synchronous in that I animate the UIImageView and then scroll to point in the UIScrollView.
Where I am having an issue is when there is a really long movement animation, the entire scrolling process struggles and I get a lot of skipped frames. I am not certain bit I think it is due to my synchronous code and I believe I need a way to execute the scrolling and the animation at the same time but I have no idea how to do it.
Is there a way to make the scrollview listen to where the UIImageView is at all times and center it when it passes a thresh hold even when in the middle of executing an animation?
By the way, I have disabled the user from scrolling the UIScrollView.
Thanks in advance.