Ansimation implementation in Swift