When emitting Tweens with a delay, set the fill mode to backward.
ClosedPublic

Authored by featherless on May 12 2017, 1:58 PM.

Details

Summary

This ensures that the animation's initial value will be visible on the property before the animation begins.

Diff Detail

Repository
rREACTIVEMOTIONSWIFT reactive-motion-swift
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
featherless created this revision.May 12 2017, 1:58 PM
Restricted Application added a reviewer: O2: Material Motion. · View Herald TranscriptMay 12 2017, 1:58 PM
Restricted Application added a project: Material Motion. · View Herald Transcript
Restricted Application added a reviewer: O4: Material Apple platform reviewers. · View Herald Transcript
Restricted Application added a reviewer: Material Motion. · View Herald Transcript
markwei accepted this revision.May 12 2017, 3:52 PM
markwei added a subscriber: markwei.

Why is this wanted behavior?

This revision is now accepted and ready to land.May 12 2017, 3:52 PM

Why is this wanted behavior?

To know: we write the final value of the tween to the model layer when we emit the animation.

Consider if we're fading from 1 to 0 with a delay. We'll write 0 to the model layer and then wait our delay amount. If fill mode is not set to backwards, then during this delay period our view's opacity will be 0. We want the view's opacity to be 1 during this delay period. To do so we need to set the fill mode to backward.

This revision was automatically updated to reflect the committed changes.