* [ios] adjust set opacity location

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

Branch: refs/heads/0.16-dev
Commit: 6404b4cad742cb0d570483fedb25d6295c2b7b73
Parents: 82f468f
Author: acton393 <[email protected]>
Authored: Tue Sep 19 15:23:01 2017 +0800
Committer: acton393 <[email protected]>
Committed: Tue Sep 19 15:23:01 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6404b4ca/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m 
b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
index 49a90db..52af2ba 100644
--- a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
+++ b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
@@ -331,14 +331,13 @@
     WXRadii *radii = borderRect.radii;
     CGFloat topLeft = radii.topLeft, topRight = radii.topRight, bottomLeft = 
radii.bottomLeft, bottomRight = radii.bottomRight;
     
+    CGContextSetAlpha(context, _opacity);
     // fill background color
     if (_backgroundColor && CGColorGetAlpha(_backgroundColor.CGColor) > 0) {
         CGContextSetFillColorWithColor(context, _backgroundColor.CGColor);
-        CGContextSetAlpha(context, _opacity);
         UIBezierPath *bezierPath = [UIBezierPath 
wx_bezierPathWithRoundedRect:rect topLeft:topLeft topRight:topRight 
bottomLeft:bottomLeft bottomRight:bottomRight];
         [bezierPath fill];
     }
-    
     // Top
     if (_borderTopWidth > 0) {
         if(_borderTopStyle == WXBorderStyleDashed || _borderTopStyle == 
WXBorderStyleDotted){

Reply via email to