Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26586] iOS: Animation curve ease-in/ease-out does not auto-reverse correctly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-11-29T14:38:53.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.0.0
ComponentsiOS
Labelsanimation, ios, repeat, reverse
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-11-21T02:11:03.000+0000
Updated2018-11-30T12:24:47.000+0000

Description

*Summary:* A view animation with "autoreverse" set to true and a "repeat" of 0 (the default) will not correctly reverse the animation when using "curve" Ti.UI.ANIMATION_CURVE_EASE_IN or Ti.UI.ANIMATION_CURVE_EASE_OUT. The animation incorrectly uses the same curve when performing the reverse animation. If "repeat" is set to 1 or higher, this issue will only happen on the final/last repeated reverse animation. This issue won't happen on prior repeated animations. *Expected Behavior:* When the curve is set to Ti.UI.ANIMATION_CURVE_EASE_IN, then the reverse animation curve is supposed to be Ti.UI.ANIMATION_CURVE_EASE_OUT. When the curve is set to Ti.UI.ANIMATION_CURVE_EASE_OUT, then the reverse animation curve is supposed to be Ti.UI.ANIMATION_CURVE_EASE_IN. The above is how it works in HTML5 "reverse" animation. See... https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction#Syntax *Cause:* Titanium's iOS code generates its own reverse animation to work-around an Apple bug. The issue is that the reverse animation uses the same "curve" as the forward animation. This is where the reverse curve should be applied instead. https://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/API/TiAnimation.m#L412

Attachments

FileDateSize
AnimationCurveTest.js2018-11-21T02:11:32.000+00001800

Comments

  1. Joshua Quick 2018-11-22

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10486
  2. Samir Mohammed 2018-11-30

    *Closing ticket.* Fix verified in SDK Version 8.0.0.v20181129161342. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10486

JSON Source