View Single Post
I find that it can handle a fair amount of text with ease as long as it doesn't have a number of attributes added to it.

Because in my app I need to add attributes (and quite a lot, to be honest) I had to find a way around this problem by improving the speed of typing but still allowing the user to see the attributes/colors.

I ended up editing OUIEditableFrame so that it only display's the kCTForegroundColor attributes that the user can see at the time. So while the user is typing, all the other kCTForegroundColor attributes the user can't see aren't drawn. When the user scroll's to a point and stops, the view is redrawn so the user can see the color again.

Even though this works fairly well, I'm stilling having trouble with the font as I can't do the same thing as I did with the color because it offsets the text as the line height changes. The problem with the font is that even though I've added the attribute to the whole of the string it is actually split and added to each range with a pre-existing attribute (in my case the color) and the runs in between them.

Have you been able to reproduce the performance problems?