I want to know the selecedRange of UITextView, I use the delegate method testViewDidChangeSelection. The problem is this method only called when I change selection, but if I tap and hold on textView, the magnifying glass appears and will also select some text without call this function. In my case, my textview is not editable, user can only select and copy. I want to know how can I know magnifying glasses is dismissed, so that I can get the selected text info. Or is there any other way to achieve this?
Thank you guys who helped me to analyze this problem, and finally I find the solution. My real problem is when I rotate my device, the selection is lost. During the rotation, I redraw the textView as well as reset its text. When we reset the text of UItextview, its property selectedRange will be reset too, that's why the selection is lost. Thank you jimpic and NobleK :)