Hanks10100 closed pull request #1364: [WEEX-504][iOS] <textarea> set
:active,placeholder display when activ…
URL: https://github.com/apache/incubator-weex/pull/1364
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
index 24ee17f0ad..21769016d0 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
@@ -185,6 +185,11 @@ -(void)setEditBorder:(UIEdgeInsets)border
-(void)setAttributedPlaceholder:(NSMutableAttributedString *)attributedString
font:(UIFont *)font
{
+ if ([_textView.text length] > 0) {
+ self.placeHolderLabel.text = @"";
+ return;
+ }
+
if (self.placeholderColor) {
[attributedString addAttribute:NSForegroundColorAttributeName
value:self.placeholderColor range:NSMakeRange(0,
self.placeholderString.length)];
[attributedString addAttribute:NSFontAttributeName value:font
range:NSMakeRange(0, self.placeholderString.length)];
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
With regards,
Apache Git Services