Module: animator

Methods

(static) animateFromTo(view, a, b, callbackopt)

Animate a view from `A` to `B` properties. It puts the `A` properties before the animations starts, then it animates to `B`.
Parameters:
Name Type Attributes Default Description
view Ti.UI.View The view to animate
a Object Initial state
b Object Final state
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeIn(opt)

Fade in the view
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeInBottom(opt)

Fade in the view with an offset from bottom
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
offset Number <optional>
50 The offset to apply when animation starts
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeInLeft(opt)

Fade in the view with an offset from left
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
offset Number <optional>
50 The offset to apply when animation starts
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeInRight(opt)

Fade in the view with an offset from right
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
offset Number <optional>
50 The offset to apply when animation starts
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeInUp(opt, durationopt)

Fade in the view with an offset from up
Parameters:
Name Type Attributes Default Description
opt Object
Properties
Name Type Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
opt.offset Number <optional>
50 The offset to apply when animation starts
opt.callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeInWithTransform(opt)

Fade in the view applying a matrix transformation
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
startTransform Ti.UI.2DMatrix The initial matrix
endTransform Ti.UI.2DMatrix The final matrix
duration Number <optional>
400 The duration in ms
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fadeOut(opt)

Fade out the view
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
400 The duration in ms
callback function <optional>
null Callback to execute when animation ends
Source:

(static) fallDownForGravity(opt) → {function}

Treat the view to animate like a normal falling object
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
friction Number <optional>
0.6 The friction to apply when the object touch the ground
potentialEnergy Number <optional>
10 The initial potential energy of the object
y Number <optional>
60 The initial height of the object
gravity Number <optional>
9.81 The world gravity
callback function <optional>
null Callback to execute when animation ends
Source:
Returns:
A function that can be used to stop the animation calling its `stop()` method
Type
function

(static) upAndDown(opt) → {function}

Indefinitely move up and down a view
Parameters:
Name Type Description
opt Object
Properties
Name Type Attributes Default Description
view Ti.UI.View The view to animate
duration Number <optional>
1000 The duration of the animation
y Number <optional>
10 How many pixel move up and down
Source:
Returns:
A function that can be used to stop the animation calling its `stop()` method
Type
function