weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sospar...@apache.org
Subject [12/50] incubator-weex git commit: * [ios] fix text trunk line
Date Fri, 09 Jun 2017 01:52:23 GMT
* [ios] fix text trunk line


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

Branch: refs/heads/master
Commit: ee2cd69077f071307ec5a6f2eb44992325bc1d54
Parents: 1308ff1
Author: acton393 <zhangxing610321@gmail.com>
Authored: Fri Jun 2 12:46:19 2017 +0800
Committer: acton393 <zhangxing610321@gmail.com>
Committed: Fri Jun 2 12:46:19 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ee2cd690/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index f3fbd93..362fce6 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -754,7 +754,7 @@ do {\
         NSAttributedString *attributedString = [self buildCTAttributeString];
         NSAttributedString * lastLineText = nil;
         NSRange lastLineTextRange = WXNSRangeFromCFRange(CTLineGetStringRange(lastLine));
-        NSRange attributeStringRange = NSRangeFromString(attributedString.string);
+        NSRange attributeStringRange = NSMakeRange(0, attributedString.string.length);
         NSRange interSectionRange = NSIntersectionRange(lastLineTextRange, attributeStringRange);
         if (!NSEqualRanges(interSectionRange, lastLineTextRange)) {
             // out of bounds


Mime
View raw message