Yes, it's for a custom UITextInput implementation. I'm not using TextKit as my layout needs go beyond what's NSLayoutManager can do, but I store my model as a NSMutableAttributedString and my indexes are wrapping UTF16Offsets.
Post
Replies
Boosts
Views
Activity
It turns out that my firstRectForRange(for:) function was returning the whole line fragment containing the range. Since I don't use autocorrection in my view, this method is not called usually and I missed the issue.
The scribble interaction calls this method internally. Once returning the correct values, it works like a charm!