I have a UITextView that has its delegate set to my view controller
I would like to your help in figuring out how to find out, through delegate methods, subclassing,
Just to expand on @rmaddy's comment. You'll want to use the UITextViewDelegate
method -textViewDidChangeSelection: to be notified when the selected range in the text view changes. From there, you can access the NSRange representing the selection of text via the text view's selectedRange
property.
- (void)textViewDidChangeSelection:(UITextView *)textView
{
NSRange range = textView.selectedRange;
}