I reset the restriction and make the animation ( self.view.layoutIfNeeded()) a delay of 3 seconds, in some cases I want to remove the animation, what should I do, I tried self.view.layer.removeAllAnimations(), but did not work
this is my animation code
UIView.animateWithDuration(0.3, delay: 3, options: UIViewAnimationOptions.CurveEaseInOut, animations: { () -> Void in
self.messageViewLeftConstraint.constant = 36
self.view.layoutIfNeeded()
}, completion: { (finished) -> Void in
})
this is the cancellation code i tried
self.view.layer.removeAllAnimations()
source
share