Repository: incubator-weex Updated Branches: refs/heads/0.15-dev 1b4438829 -> 7f247fc4e
+ [ios] fix bug if duration is 0 or negative, animation time is given 0.25 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/08313fee Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/08313fee Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/08313fee Branch: refs/heads/0.15-dev Commit: 08313feeee6b5b4ed1837d9e6982680ae7909606 Parents: 1b44388 Author: é½å±± <sunjjb...@163.com> Authored: Wed Jul 5 22:38:01 2017 +0800 Committer: é½å±± <sunjjb...@163.com> Committed: Wed Jul 5 22:38:01 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/08313fee/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 76a9d6a..fc12769 100644 --- a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m +++ b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m @@ -356,6 +356,9 @@ WX_EXPORT_METHOD(@selector(transition:args:callback:)) layer.frame = originFrame; } [layer addAnimation:animation forKey:info.propertyName]; + if(WXFloatEqual(animation.duration, 0) || WXFloatLessThan(animation.duration, 0)){ + [layer removeAllAnimations]; + } } @end