I have implemented the UITextViewDelegate in my view Controller, which needs to do something when the text selection changes in textView.
So I used textview:didChangeSelection
to listen to call back events. It works on the iPhone simulator and iOS5 ,but not on iPhone4 devices. Why does that happen?
Debug information tells me that the textview:didChangeSelection
isn't getting called when I change selection with range of 0 length....
- (void)textViewDidChangeSelection:(UITextView *)textView
{
if (textView.selectedRange.location != NSNotFound) {
selectRange = textView.selectedRange;
}
}
Can anyone can help to fix the problem?