Skip to content

Instantly share code, notes, and snippets.

@estan
Created March 23, 2016 13:32
Show Gist options
  • Save estan/f2999d7d79c260c86f76 to your computer and use it in GitHub Desktop.
Save estan/f2999d7d79c260c86f76 to your computer and use it in GitHub Desktop.
transitions: [
Transition {
RotationAnimation {
// Animate all rotation changes.
duration: 1000
easing.type: Easing.InOutQuad
direction: {
// Take the shortest direction.
if (from < to)
if (Math.abs(from - to) < 180)
return RotationAnimation.Counterclockwise
else
return RotationAnimation.Clockwise
else
if (Math.abs(from - to) < 180)
return RotationAnimation.Clockwise
else
return RotationAnimation.Counterclockwise
}
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment