I am trying to make a text editor using UITextView in ios7 and above, but I am facing some terrible bugs. I have gone through many Stack Overflow questions related to scrolling of textview. But the main issue about which I am not able to find is slow rendering of text after adding NSTextAttachment(Custom) to it. I am using the approach described on this post:
But after adding the images the typing of text becomes terribly slow. The code is almost the same as described in the post so I have not pasted it here. The reason can be as said in the following question: ios - iOS 7 UITextView is slow after typing lots of text
"drawGlyphsForGlyphRange runs N*2 times, where N is the number of times your lines word-wrapped."
But I am not sure. Any advice in a direction to solve this terribly slow rendering of text?