I have a UITextView which I’m assigning a large amount of text to (~25 lines). It works fine if I don’t define a font against the textview, but as soon as I set the font to be anything above size 13, then the text disappears completely (though still scrollable).
The other thing is that if I slowly type in text manually to reach the cross over point, the last line is split in two, and continuing to type just produces blank text.
Its as if the text view can only contain so much visible text and as soon as that is reached the text becomes blank.
Any suggestions welcome.
EDIT:
Actually copying and pasting the above answer text into the text view, and then adding one more line is enough to make it start to turn invisible. Then when reloading the text view with the updated text (i.e answer above plus one line), its all invisible.
Setting the font size is enough to break it, just by doing systemFontOfSize: to 14. The actual font size which causes it varies depending on the amount of text in the text view.
Also using ARC.
So what I suggest you do is create a new single view project in Xcode, add a single UITextView to your view, and then manipulate it exactly as you are in the main project. You are doing something wrong – setting the font to nil, someone releasing the textView, or otherwise corrupting it. All messages to it MUST be on the main thread. Add asserts after any object property you are sending to the textView. As you can see huge font huge text is working just fine for me doing as I’m suggesting you do. The ideas is to start with something that works, keep adding code from your main project to the test project until you find exactly what you are doing that is causing the problem.