Skip to content

Coordinate Space

Luke Zhao edited this page Feb 12, 2017 · 3 revisions

Coordinate Space

Global Coordinate Space (default before 0.1.3)

Animating views are not affected by parent views' attributes. Does not move with the parent view. I.e. They are being taken out of the view hierarchy once heroModifiers are applied. Use useGlobalCoordinateSpace modifier to force this behavior after 0.1.3.

Local Coordinate Space (default after 0.1.3)

Animating views moves along with its parent view. Note that when a view is matched, or when source or useGlobalCoordinateSpace modifiers are used, the view will go back to global coordinate space.

For the examples above, the following heroModifiers are applied.

greyView.heroModifiers = [.translate(y:100)]
blackView.heroModifiers = nil
redView.heroModifiers = [.translate(x:50)]
Clone this wiki locally