Create UITextRange from NSRange
You can create a text range with the method textRangeFromPosition:toPosition. This method requires two positions, so you need to compute the positions for the start and the end of your range. That is done with the method positionFromPosition:offset, which returns a position from another position and a character offset. – (CGRect)frameOfTextRange:(NSRange)range inTextView:(UITextView *)textView { UITextPosition … Read more