Is there a way to detect when the user changes the range of the selected text in text form (in a subclass of UITextView)? I could not find NSNotification. I tried to observe key values, but the observer for the selected range did not receive a call
[self addObserver:self forKeyPath:@"selectedRange" options:NSKeyValueObservingOptionNew context:nil]; - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqual:@"selectedRange"]) {
I DO NOT want to use the UITextView delegate method
ios objective-c uitextview
aryaxt
source share