[ad_1]
Requirement is to point out the view with spring impact on lengthy press of the button. I achieved this by following code:
collapsibleOptionsView.rework = CGAffineTransform(scaleX: 0, y: 0)
UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, choices: .curveEaseInOut, animations: {
self.collapsibleOptionsView.isHidden = false
self.collapsibleOptionsView.layoutIfNeeded()
}, completion: nil)
The identical view must be closed by taking part in the spring impact animation. However I’m not capable of obtain it. The utmost I achieved was to EaseOut the UIView out of superView. However I want spring impact animation on it. Any solutions how I can obtain this?
Thanks prematurely.
[ad_2]
