Revert "* [ios] support rtl text direction" This reverts commit 5307a2b1f04c2279d5f5a806fb642c9b13ef8187.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d6388eaa Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d6388eaa Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d6388eaa Branch: refs/heads/0.16-dev Commit: d6388eaa665bd23b6f4bca7970324a29278cafa2 Parents: 5c23098 Author: acton393 <zhangxing610...@gmail.com> Authored: Thu Sep 7 17:15:42 2017 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Thu Sep 7 17:15:42 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 13 ------------- 1 file changed, 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d6388eaa/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 e7e118a..664b0e8 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -124,7 +124,6 @@ CGFloat WXTextDefaultLineThroughWidth = 1.2; CGFloat _lineHeight; CGFloat _letterSpacing; BOOL _truncationLine; // support trunk tail - NSString * _writeDirection; BOOL _needsRemoveObserver; NSAttributedString * _ctAttributedString; @@ -254,9 +253,6 @@ do {\ [self setNeedsRepaint]; [self setNeedsLayout]; } - if (attributes[@"dir"]) { - _writeDirection = [[WXConvert NSString:attributes[@"dir"]] lowercaseString]; - } } - (void)setNeedsRepaint @@ -397,11 +393,6 @@ do {\ [attributedString addAttribute:NSForegroundColorAttributeName value:_color range:NSMakeRange(0, string.length)]; } - if ([[_writeDirection lowercaseString] isEqualToString:@"rtl"]) - { - [attributedString addAttribute:(id)kCTWritingDirectionAttributeName value:@[@(kCTWritingDirectionRightToLeft|kCTWritingDirectionEmbedding)] range:NSMakeRange(0, string.length)]; - } - if (_fontFamily) { NSString * keyPath = [NSString stringWithFormat:@"%@.tempSrc", _fontFamily]; NSString * fontSrc = [[[WXRuleManager sharedInstance] getRule:@"fontFace"] valueForKeyPath:keyPath]; @@ -480,10 +471,6 @@ do {\ if(_color) { [attributedString addAttribute:NSForegroundColorAttributeName value:_color range:NSMakeRange(0, string.length)]; } - if ([[_writeDirection lowercaseString] isEqualToString:@"rtl"]) - { - [attributedString addAttribute:NSWritingDirectionAttributeName value:@[@(1)] range:NSMakeRange(0, string.length)]; - } if (_fontFamily) { NSString * keyPath = [NSString stringWithFormat:@"%@.tempSrc", _fontFamily];