* [ios] fix scale blur

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

Branch: refs/heads/0.11-dev
Commit: f1950d290c8d65fa2011125ad3bccd9c38d12871
Parents: adfe7b0
Author: acton393 <[email protected]>
Authored: Mon Feb 20 15:19:18 2017 +0800
Committer: acton393 <[email protected]>
Committed: Mon Feb 20 15:19:18 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f1950d29/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 b042fa8..9c469e1 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
@@ -135,7 +135,11 @@ WX_EXPORT_METHOD(@selector(transition:args:callback:))
                    Here comes the black magic: In the scale transformation, 
change the z parameter to anything different from 1.0, the jump is gone.
                    See 
http://stackoverflow.com/questions/27931421/cgaffinetransform-scale-and-translation-jump-before-animation
                  **/
-                layer.transform = CATransform3DScale(transform, 1, 1, 1.00001);
+                CGFloat sz = 1.00001;
+                if ([args[@"fixScale"] boolValue]) {
+                    sz = 1.0 + CGFLOAT_MIN;
+                }
+                layer.transform = CATransform3DScale(transform, 1, 1, sz);
             }
             if (isAnimateBackgroundColor) {
                 layer.backgroundColor = backgroundColor;

Reply via email to