You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/07 08:06:18 UTC
[41/50] incubator-weex git commit: * [ios] fix text trunk line
* [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/dev
Commit: ee2cd69077f071307ec5a6f2eb44992325bc1d54
Parents: 1308ff1
Author: acton393 <zh...@gmail.com>
Authored: Fri Jun 2 12:46:19 2017 +0800
Committer: acton393 <zh...@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