Repository: incubator-weex
Updated Branches:
  refs/heads/0.12-dev 1aa4ec01a -> afad8d287


* [ios] use old text render logic which the os version less than 10.0


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

Branch: refs/heads/0.12-dev
Commit: 6fa910f5ee51668c99584095c42ceea23f3ebfec
Parents: a6b0767
Author: acton393 <zhangxing610...@gmail.com>
Authored: Thu Apr 20 16:16:27 2017 +0800
Committer: acton393 <zhangxing610...@gmail.com>
Committed: Thu Apr 20 16:16:27 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m     |  2 +-
 ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6fa910f5/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m 
b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index 5f837cc..7d58cf3 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -236,7 +236,7 @@
     _jsContext[@"WXEnvironment"] = data;
 }
 
-typedef void (*WXJSCGarbageCollect)(JSContextRef);
+//typedef void (*WXJSCGarbageCollect)(JSContextRef);
 
 - (void)garbageCollect
 {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6fa910f5/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 09b255d..56c158a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -75,7 +75,10 @@
             return self.wx_component->_ariaLabel;
         }
     }
-    return _textStorage.string;
+    if (![(WXTextComponent*)self.wx_component useCoreText]) {
+        return _textStorage.string;
+    }
+    return [(WXTextComponent*)self.wx_component valueForKey:@"_text"];
 }
 
 @end
@@ -146,12 +149,18 @@ CGFloat WXTextDefaultLineThroughWidth = 1.2;
 
 - (BOOL)useCoreText
 {
+    if (WX_SYS_VERSION_LESS_THAN(@"10.0")) {
+        // there is something wrong with coreText drawing lineHeight, trying 
to fix this, or anyone who can help me to fix this.
+        return NO;
+    }
+    
     if ([_useCoreTextAttr isEqualToString:@"yes"]) {
         return YES;
     }
     if ([_useCoreTextAttr isEqualToString:@"false"]) {
         return NO;
     }
+    
     if ([WXTextComponent textRenderUsingCoreText]) {
         return YES;
     }

Reply via email to