This repository was archived by the owner on Jun 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ios/sdk/WeexSDK/Sources/Module Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -319,10 +319,10 @@ - (void)_calculatetransitionProcessingStyle
319
319
}
320
320
321
321
// Bugfix: https://github.com/apache/incubator-weex/issues/2347
322
- NSUInteger frameCount = _transitionDuration * 60 / 1000 ;
322
+ NSUInteger frameCount = MAX ( _transitionDuration * 60 / 1000 , 1 ) ;
323
323
NSUInteger currentFrame = _transitionCount + 1 ;
324
324
double per = (double )currentFrame / frameCount; // linear
325
- if (![[NSString stringWithFormat: @" %@ " ,_transitionTimingFunction] isEqualToString: kCAMediaTimingFunctionLinear ]) {
325
+ if (currentFrame < frameCount && ![[NSString stringWithFormat: @" %@ " ,_transitionTimingFunction] isEqualToString: kCAMediaTimingFunctionLinear ]) {
326
326
per = [self solveWithx: per epsilon: SOLVE_EPS (_transitionDuration)];
327
327
}
328
328
@@ -449,7 +449,7 @@ - (void)_awakeTransitionDisplayLink
449
449
- (void )_handleTransitionDisplayLink
450
450
{
451
451
WXAssertComponentThread ();
452
- int count = _transitionDuration * 60 / 1000 ;
452
+ int count = MAX ( _transitionDuration * 60 / 1000 , 1 ) ;
453
453
if (_transitionCount >= count) {
454
454
[self _suspendTransitionDisplayLink ];
455
455
[self _resetProcessAnimationParameter ];
You can’t perform that action at this time.
0 commit comments