robb / Cartography

A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:
Other
7.34k stars 525 forks source link

Unable to animate constraints change on macOS #279

Open nhojb opened 6 years ago

nhojb commented 6 years ago

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?