I have a subclass UITableViewCell containing a UITextView. I added NSParagraphStyle as an attribute for a string in a subclass of NSTextStorage. In the following code, I increased the space between each row in a UITextView.
speed
let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.lineSpacing = 11 myCustomTextStorage.appendAttributedString(NSAttributedString(string: someText, attributes: [NSParagraphStyleAttributeName: paragraphStyle]))
The height of the cursor extends to the height of the next line, as shown below. This only happens in lines to the last line.

I looked through several posts on this subject, including this post ; however, none of the proposed solutions seem to work for me.
I read the TextKit documentation but could not find a solution for this problem.
Is there a way to reduce the height of the cursor?
source share