I am getting an error recently:
requesting caretRectForPosition: while the NSTextStorage has oustanding changes {x, x}
* "Alienation" is literally what he says, and this is not my typo.
This is called when I repeat through an NSTextStorage subclass of NSTextView using the enumerateAttribute() method and manipulating NSTextAttachment in the text view after every change in the text view.
func manipulateText() { let text = customTextView.textStorage text.enumerateAttribute(NSAttachmentAttributeName, inRange: NSMakeRange(0, text.length), options: NSAttributedStringEnumerationOptions(rawValue: 0)) {
Questions like this one seem to be online, but I haven't managed to find any occurrences in this case yet and it seems to only apply to iOS 9.
This only happens when using the physical keyboard on the iPad.
source share