Posts

Post marked as solved
4 Replies
4.9k Views
I have implemented an animation using UIViewPropertyAnimator to scroll a horizontal stack view. animator = UIViewPropertyAnimator(duration: ct, curve: .easeInOut) { self.scrollView.contentOffset = CGPoint(x: self.horizStackView.bounds.width - screenWidth, y: 0) } animator?.isInterruptible = true animator?.isUserInteractionEnabled = trueWhilst the animation is in progress the user can use drag gesture to scroll the image left or right. My issue is that the animator allows the image to be scrolled past the image ENDS (start or end) indefinately. However when the animation is paused or finished the user cannot scroll past the image ends. This is the desired behaviour. If I disable isUserInteractionEnabled then user cannot scroll which is FINE but it also disables the TAP gesture. I really need the TAP gesture to work as I reveal Play/Pause button.Can help? How can I stop user scrolling past image ends indefinitely whilst animation is in progress.
Posted
by Daxa .
Last updated
.