Browse Source

bugfix:
https://github.com/ibireme/YYKit/issues/273
https://github.com/ibireme/YYText/issues/451

ibireme 9 years ago
parent
commit
07193fb84c
2 changed files with 2 additions and 1 deletions
  1. 1 1
      YYText/Utility/NSAttributedString+YYText.m
  2. 1 0
      YYText/YYTextView.m

+ 1 - 1
YYText/Utility/NSAttributedString+YYText.m

@@ -824,7 +824,7 @@ return style. _attr_;
 }
 
 - (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 {

+ 1 - 0
YYText/YYTextView.m

@@ -2364,6 +2364,7 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
             _placeholderAttributedText = atr;
         }
     }
+    _placeholderText = [_placeholderAttributedText yy_plainTextForRange:NSMakeRange(0, _placeholderAttributedText.length)];
     [self _commitPlaceholderUpdate];
 }