FlightAnimator icon indicating copy to clipboard operation
FlightAnimator copied to clipboard

Repeating animations

Open jeremytregunna opened this issue 9 years ago • 3 comments
trafficstars

I'm most likely just missing something, but I don't see any property that lets me specify that I want an animation and its sub animations to repeat. Is there something to help with this use case?

jeremytregunna avatar Aug 30 '16 15:08 jeremytregunna

This is actually in the works on the dev branch. I am still thinking of the how to apply the syntax of FlightAnimator. Any recommendations would be highly appreciated.

The upcoming functionality will support the following flags:

var autoreverse : Bool- enable auto reverse) var autoreverseCount : Int - specific count of time to reverse the animation var autoreverseDelay : Double - delay to wait to start the reverse animation var reverseEasingCurve : Bool - ability to invert the easing curve

AntonTheDev avatar Aug 30 '16 17:08 AntonTheDev

Could you not just use the default animation options or count with Float.infinity?

wess avatar Aug 30 '16 17:08 wess

Well, I as gonna approach like the UILabel's numerOfLines property.

Where once you enable autoreverse, the autoreverse count would determine it as:

  • 0, implies infinity, so it keeps repeating over and over again.
  • 1, default value, only repeats once
  • 2+, repeat a specific amount of times

AntonTheDev avatar Aug 30 '16 17:08 AntonTheDev