In iOS, the following code:
button.backgroundColor = "#FF0000"
button.animate({
backgroundColor: new colorModule.Color("#00FFFF"),
duration: 500
});
Animates a button's background from white (the default) to teal #00FFFF without setting it to red initially #FF0000. So I guess the animation works, but somehow overrides/ignores the button.backgroundColor = "#FF0000" setter.
This was working before the following feature was introduced: #936 The problem is using the UIViewKeyframeAnimationOptionBeginFromCurrentState key to allow animations to interrupt a previous animation from the middle and continue smoothly.
As a workaround you can chain two animations:
button.animate({
backgroundColor: new colorModule.Color("#FF0000"),
duration: 10
}).then(function() {
return button.animate({
backgroundColor: new colorModule.Color("#00FFFF"),
duration: 500
});
}
Both are common concepts but seem to be mutually exclusive for iOS. We will have to find alternative for the animation API that works in both cases or control the behavior with a property.
In iOS, the following code:
Animates a button's background from white (the default) to teal
#00FFFFwithout setting it to red initially#FF0000. So I guess the animation works, but somehow overrides/ignores thebutton.backgroundColor = "#FF0000"setter.This was working before the following feature was introduced: #936 The problem is using the
UIViewKeyframeAnimationOptionBeginFromCurrentStatekey to allow animations to interrupt a previous animation from the middle and continue smoothly.As a workaround you can chain two animations:
Both are common concepts but seem to be mutually exclusive for iOS. We will have to find alternative for the animation API that works in both cases or control the behavior with a property.