I need notifications with textView.text, but the do not work.
My code:
Add a KVO:
[textView addObserver:self
forKeyPath:@"text"
options:NSKeyValueObservingOptionNew
context:nil];
Observing method
-(void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
I am trying change contentSize. KVO is working...
https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/KVO.html
There have another way to help you simply.
Conform
UITextViewDelegate
protocol methods.Use method
- (void)textViewDidChange:(UITextView *)textView;
to gettextView.text
changed.