From cb3dfcbec8b813867494d3d21a1fcbfdd25cd5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B6=9B?= Date: Mon, 15 Jun 2020 20:19:40 +0800 Subject: [PATCH] feat:iOS animation reset duration when duration is 0 --- doric-iOS/Pod/Classes/Shader/DoricViewNode.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m index a86489a3..f58d209d 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m @@ -551,6 +551,9 @@ - (void)doAnimation:(id)params withPromise:(DoricPromise *)promise { } animation.removedOnCompletion = NO; animation.fillMode = kCAFillModeForwards; + if(animation.duration==0){ + animation.duration=FLT_MIN; + } [self.view.layer addAnimation:animation forKey:nil]; }