Skip to content

Animating via constraint toggle? #1

Description

@winstondu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions