XLFormTextView textChanged: fires excessively
drifkind opened this issue · 0 comments
drifkind commented
Every instance of XLFormTextView gets notified when any text view changes. Fix:
--- a/XLForm/XL/Helpers/Views/XLFormTextView.m
+++ b/XLForm/XL/Helpers/Views/XLFormTextView.m
@@ -40,7 +40,7 @@ - (instancetype)initWithFrame:(CGRect)frame
self.contentInset = UIEdgeInsetsMake(0, -4, 0, 0);
[self setPlaceholder:@""];
[self setPlaceholderColor:[UIColor colorWithRed:.78 green:.78 blue:.80 alpha:1.0]];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:self];
}
return self;
}