I\'m using this method for converting a NSRange to a CGRect as it relates to a UITextView:
- (CGRect)frameOfTextRange:(NSRange)range inTextView:(UITextView *
You can force self.textView to ensure the layout of textView immediately with
[self.textView.layoutManager ensureLayoutForTextContainer:self.textView.textContainer];
Placing that before your frameOfTextRange: call will gives you right rect.