You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/09 08:16:13 UTC

[4/8] incubator-weex git commit: * [ios] Fix issue that [view setTransform:] not working after animation * all CABasicAnimaitions should be removed when animation stops, otherwise it will affect view or layer's transform property * test demo: http://

* [ios] Fix issue that [view setTransform:] not working after animation
  * all CABasicAnimaitions should be removed when animation stops, otherwise it will affect view or layer's transform property
  * test demo: http://dotwe.org/weex/6a0695ca46f6abfe9638eb391aac729c


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/92802970
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/92802970
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/92802970

Branch: refs/heads/0.11-dev
Commit: 928029703f3984aad956e60ba8e72200798869ee
Parents: 9a4ff8f
Author: \u9690\u98ce <cx...@apache.org>
Authored: Thu Mar 9 15:19:33 2017 +0800
Committer: \u9690\u98ce <cx...@apache.org>
Committed: Thu Mar 9 15:19:33 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/92802970/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
index 404402e..4527979 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
@@ -89,6 +89,12 @@
 
 - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
 {
+    if (!_animationInfo.target) {
+        return;
+    }
+    
+    [_animationInfo.target.layer removeAllAnimations];
+    
     if (_finishBlock) {
         _finishBlock(flag);
     }