lotus-ios / lotus

A Swift animation DSL for animating layers with help of CoreAnimation
MIT License
15 stars 2 forks source link

Type issues #37

Closed vkondrashkov closed 4 years ago

vkondrashkov commented 4 years ago

There are some issues depending on which type is passed as argument to any AnimationMaker function:

  1. If pass integer value in function during(:) or delay(:) it seems that it's replaced with close to zero value, example:

    make.motion(.horizontal).to(200.0).during(10.0) // works correctly, animation duration is 10 seconds
    make.motion(.horizontal).to(200.0).during(10) // works incorrectly, animation duration is close to zero
  2. If pass non-float value in function to(:) for motion animation it crashes, example:

    make.motion(.horizontal).to(200) // crash