Currently, with UIView.animate, it is possible to do an animation through a constraint toggle.
For example, if we have an object rect, and we have two layout constraints on its location, constrainRectToTop and constrainRectToTop, we can do as follows:
UIView.animate(withDuration: 0.35, delay: 0.35, animations: {
self.constrainRectToTop.isActive = false
self.constrainRectToBottom.isActive = true
self.view.layoutIfNeeded()
}
What would be a general way of accomplishing this using MotionMachine?
Currently, with
UIView.animate, it is possible to do an animation through a constraint toggle.For example, if we have an object
rect, and we have two layout constraints on its location,constrainRectToTopandconstrainRectToTop, we can do as follows:What would be a general way of accomplishing this using MotionMachine?