You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider exposing cross platform abstraction for as much as possible from the CSS3 easing functions. The linear, ease-in, ease-out, ease-in-out should be easily achieved since they are defined as constants in iOS and there are corresponding Accelerate/Decelerate/AccelerateDecelerate Interpolators in android.
steps looks impossible for iOS, can be achieved with PathInterpolator for android. Since it does not really look like a true animation I guess we can ignore it anyway.
bounce/spring are desirable but it seems some of them can be achieved only by using multiple keyframes with adequate besier timing functions in iOS.
And I see @ the source code, ios animation keyframe option is not using the right option, maybe its not used like it intended to do ? The options should be :
Linear: makes the animation go from one point to the next, through each point in between.
Discrete: makes the animation leap directly from one point to the next. This option is presumably useful when you are specifying each frame in an animation
Paced: makes the animation "evenly paced", whatever that means. It seems to make it ignore either the start time or duration of the key frames, but not in a predictable way, so I'm not sure why you'd want to do that.
Cubic: uses the default Catmull-Rom spline (me neither) to interpolate between the keyframe values. Basically this smooths out any rough edges created by your key frame points.
Cubic paced: a cross between Cubic and Paced.
and not UIViewKeyframeAnimationOptionBeginFromCurrentState like in animation.ios.ts
But then again it still using setAnimationCurve and not from the above options
You are right.
I will check if the easing is applied at the moment.
We wouldn't use keyframe animations here, but we have problems with a particular case where an animation is applied and a view was moved from one point to another, but half way the animation, it is interrupted by a second animation that wants to move it to a third point. The animateWithDuration:delay:options:animations:completion: has the EaseInOut, EaseIn, EaseOut, Linear easing but when its UIViewAnimationOptionBeginFromCurrentState was set it couldn't handle well when 2 out of the three translation, rotation and scale were set. It looked like the transformation matrix was not properly decomposed when the second animation starts and the view jumps before the second animation. We may be forced to provide a continue from current state like option and switch between the 3 APIs based on this and the animation easing:
@x4080 I think in android he uses BounceInterpolator. You can check the PR, referred above. Feedback is welcomed. If you find problems please open a new issue. :) In iOS he used the spring animations overall moved to the CoreAnimation framework.
Nice, since we in the topic, I found that if we move or animate view in ios then a rotation occurs, the view position is back to before move or animation. Which didn't happened in Android, will this fix this problem too?
Activity
x4080 commentedon Jan 13, 2016
I think we need bounce/spring animation in ios/android, in ios can we use :
And I see @ the source code, ios animation keyframe option is not using the right option, maybe its not used like it intended to do ? The options should be :
and not UIViewKeyframeAnimationOptionBeginFromCurrentState like in animation.ios.ts
But then again it still using setAnimationCurve and not from the above options
PanayotCankov commentedon Jan 13, 2016
You are right.
I will check if the easing is applied at the moment.
We wouldn't use keyframe animations here, but we have problems with a particular case where an animation is applied and a view was moved from one point to another, but half way the animation, it is interrupted by a second animation that wants to move it to a third point. The
animateWithDuration:delay:options:animations:completion:has theEaseInOut, EaseIn, EaseOut, Lineareasing but when itsUIViewAnimationOptionBeginFromCurrentStatewas set it couldn't handle well when 2 out of the three translation, rotation and scale were set. It looked like the transformation matrix was not properly decomposed when the second animation starts and the view jumps before the second animation. We may be forced to provide acontinue from current statelike option and switch between the 3 APIs based on this and the animation easing:Or switch to CoreAnimation completely and animate the UIView's layer.
x4080 commentedon Jan 13, 2016
I see, is it related to using JavaScript instead of objective c? Or is it the bug in animation api?
PanayotCankov commentedon Jan 13, 2016
The problems we had that made us use the keyframes API are reproducible in pure Objective-C app.
x4080 commentedon Jan 13, 2016
Oh wow, thats quite a bug for iOS
PanayotCankov commentedon Feb 15, 2016
@tzraikov did splendid job on this one. We now have support of besier and spring curves as well the animations can begin-from-current-state.
x4080 commentedon Feb 16, 2016
spring for both?
PanayotCankov commentedon Feb 16, 2016
@x4080 I think in android he uses BounceInterpolator. You can check the PR, referred above. Feedback is welcomed. If you find problems please open a new issue. :) In iOS he used the spring animations overall moved to the CoreAnimation framework.
x4080 commentedon Feb 16, 2016
Nice, since we in the topic, I found that if we move or animate view in ios then a rotation occurs, the view position is back to before move or animation. Which didn't happened in Android, will this fix this problem too?
x4080 commentedon Mar 11, 2016
I guess not, tried it in 1.6
PanayotCankov commentedon Mar 11, 2016
@x4080 @tzraikov Is working on the animations. This may be fixed, but please open new issues when you find new problems. This issue is now closed.
x4080 commentedon Mar 11, 2016
Ok
lock commentedon Aug 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.