+ [ios] fix bug: placehodler not show

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

Branch: refs/heads/0.16-dev
Commit: 34b92dfc145284b44b7dbbe04c646de6433082b1
Parents: eaa2df3
Author: 齐山 <sunjjb...@163.com>
Authored: Fri Sep 1 12:26:06 2017 +0800
Committer: 齐山 <sunjjb...@163.com>
Committed: Fri Sep 1 12:26:06 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/34b92dfc/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
index 1136c79..c22e5cb 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXEditComponent.m
@@ -370,10 +370,10 @@ WX_EXPORT_METHOD(@selector(getSelectionRange:))
     }
     if (attributes[@"placeholder"]) {
         _placeholderString = [WXConvert 
NSString:attributes[@"placeholder"]]?:@"";
+        [self setPlaceholderAttributedString];
         if(_value.length > 0){
-            _placeholderString = @"";
+            _placeHolderLabel.text = @"";
         }
-        [self setPlaceholderAttributedString];
     }
     if (attributes[@"returnKeyType"]) {
         _returnKeyType = [WXConvert 
UIReturnKeyType:attributes[@"returnKeyType"]];

Reply via email to