diff --git a/YYText/Utility/NSAttributedString+YYText.m b/YYText/Utility/NSAttributedString+YYText.m index 4d492f1b..7d014dc9 100644 --- a/YYText/Utility/NSAttributedString+YYText.m +++ b/YYText/Utility/NSAttributedString+YYText.m @@ -824,7 +824,7 @@ - (void)setYy_strikethroughStyle:(NSUnderlineStyle)strikethroughStyle { } - (void)setYy_strikethroughColor:(UIColor *)strikethroughColor { - [self yy_setStrokeColor:strikethroughColor range:NSMakeRange(0, self.length)]; + [self yy_setStrikethroughColor:strikethroughColor range:NSMakeRange(0, self.length)]; } - (void)setYy_underlineStyle:(NSUnderlineStyle)underlineStyle { diff --git a/YYText/YYTextView.m b/YYText/YYTextView.m index 213a776c..1dbad5d3 100644 --- a/YYText/YYTextView.m +++ b/YYText/YYTextView.m @@ -2364,6 +2364,7 @@ - (void)setPlaceholderText:(NSString *)placeholderText { _placeholderAttributedText = atr; } } + _placeholderText = [_placeholderAttributedText yy_plainTextForRange:NSMakeRange(0, _placeholderAttributedText.length)]; [self _commitPlaceholderUpdate]; }