File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,13 @@ - (void)drawMentions {
8282 CGFloat width = endLocation.x - startLocation.x ;
8383 CGFloat x = lineBounds.origin .x + startLocation.x ;
8484
85- NSUInteger lineRelativeLocation = intersection.location - lineFragment.characterRange .location ;
8685 UIFont *font = [lineFragment.attributedString attribute: NSFontAttributeName
87- atIndex: lineRelativeLocation
86+ atIndex: intersection.location
8887 effectiveRange: NULL ];
8988 CGFloat ascent = font.ascender ;
9089 CGFloat descent = font.descender ;
9190 CGFloat textHeight = ascent - descent;
92- CGFloat y = (startLocation.y - ascent) / 2 ;
91+ CGFloat y = lineBounds. size . height * idx + (startLocation.y - ascent) / 2 ;
9392
9493
9594 CGRect backgroundRect = CGRectMake (x,
You can’t perform that action at this time.
0 commit comments