ibireme пре 9 година
родитељ
комит
83ef00eb0c
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      YYText/YYTextView.m

+ 3 - 3
YYText/YYTextView.m

@@ -2175,11 +2175,11 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
         [self.delegate textViewDidChange:self];
         [self.delegate textViewDidChange:self];
     }
     }
+    [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
     
     
     if (!_state.insideUndoBlock) {
     if (!_state.insideUndoBlock) {
         [self _resetUndoAndRedoStack];
         [self _resetUndoAndRedoStack];
     }
     }
-    [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
 }
 }
 
 
 - (void)setTextVerticalAlignment:(YYTextVerticalAlignment)textVerticalAlignment {
 - (void)setTextVerticalAlignment:(YYTextVerticalAlignment)textVerticalAlignment {
@@ -3348,6 +3348,7 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
         [self.delegate textViewDidChange:self];
         [self.delegate textViewDidChange:self];
     }
     }
+    [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
     
     
     _lastTypeRange = _selectedTextRange.asRange;
     _lastTypeRange = _selectedTextRange.asRange;
 }
 }
@@ -3422,10 +3423,9 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
     if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {
         [self.delegate textViewDidChange:self];
         [self.delegate textViewDidChange:self];
     }
     }
+    [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
     
     
     _lastTypeRange = _selectedTextRange.asRange;
     _lastTypeRange = _selectedTextRange.asRange;
-    
-    [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
 }
 }
 
 
 - (void)setBaseWritingDirection:(UITextWritingDirection)writingDirection forRange:(YYTextRange *)range {
 - (void)setBaseWritingDirection:(UITextWritingDirection)writingDirection forRange:(YYTextRange *)range {