[ 
https://issues.apache.org/jira/browse/WEEX-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16580767#comment-16580767
 ] 

ASF GitHub Bot commented on WEEX-563:
-------------------------------------

cxfeng1 closed pull request #1434: [WEEX-563][iOS] fix the attribute of 
linear-gradient on iOS
URL: https://github.com/apache/incubator-weex/pull/1434
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m 
b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
index e063395844..d0350551b6 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
@@ -403,7 +403,11 @@ + (NSDictionary 
*)linearGradientWithBackgroundImage:(NSString *)backgroundImage
             if ([subStr hasPrefix:@"rgb"]) {
                 gradientType = [WXConvert gradientType:gradientTypeStr];
                 
-                range = [subStr rangeOfString:@")"];
+                if ([subStr containsString:@"%"]) {
+                    range = [subStr rangeOfString:@"%"];
+                } else {
+                    range = [subStr rangeOfString:@")"];
+                }
                 NSString *startColorStr = [subStr 
substringToIndex:range.location + 1];
                 NSString *endColorStr = [subStr 
substringFromIndex:range.location + 2];
                 startColor = [WXConvert UIColor:startColorStr];


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  ios platform linear-gradient problem
> -------------------------------------
>
>                 Key: WEEX-563
>                 URL: https://issues.apache.org/jira/browse/WEEX-563
>             Project: Weex
>          Issue Type: Bug
>            Reporter: linghe
>            Assignee: Adam Feng
>            Priority: Critical
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to