Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to animate constraints change on macOS #279

Open
nhojb opened this issue Jan 4, 2018 · 0 comments
Open

Unable to animate constraints change on macOS #279

nhojb opened this issue Jan 4, 2018 · 0 comments

Comments

@nhojb
Copy link

nhojb commented Jan 4, 2018

Using the following example code:

var offset = ...

NSAnimationContext.runAnimationGroup({ (context: NSAnimationContext) in
constrain(view) { view in
view.leading = view.superview!.leading + offset
view.centerY = view.superview!.centerY
}
view.superview?.animator().layout()
}

The constraint/layout change fails to animate.

I can get the changes to animate if I instead use the view's layoutConstraints along with their animator() proxy, but this doesn't appear to be supported by Cartography.

Is there a solution to this on macOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant