I have a very simple animation block that performs the following animation:

(tap the image if the animation does not play)
func didTapButton() {
centerYConstraint.constant = 0
superview!.layoutIfNeeded()
UIView.animate(
withDuration: 1,
animations: {
self.centerYConstraint.constant = 30
self.superview!.layoutIfNeeded()
})
}
Everything is fine when I play the animation myself. It resets to position 0, and then revives 30 points.
The problem is that the user briefly presses the button several times in a row (i.e., in the middle of the current animation). Each time the user clicks the button, I expect it to be reset to position 0, and then go down 30 points. Instead, I get the following:

(tap the image if the animation does not play)
He clearly travels more than 30 points. (Closer to 120 points.)
Why is this happening, and how can I "reset" the animation correctly so that it does not exceed 30 points?
, , :
options: UIViewAnimationOptions.beginFromCurrentState. .- , dispatch_after. .
- ""
0, 0 superview!.layoutIfNeeded.
:
- , . . 30 15 , 120 .
- ,
transform CGAffineTransform.identity CGAffineTransform(scaleX: 0.5, y: 0.5), , 120 . - ,
backgroundColor = UIColor(white: 0, alpha: 0.5) - backgroundColor = UIColor(white: 0, alpha: 0), (.. , , 0.5 )..