In my app I update a textView programmatically. I actually loop through a dataset from a SQLITE3 DB and show a specific text for a given time. Then I would like to show the text from the next dataset record and so forth. I have been browsing through all kind of forums and the apple doc as well, but could not find anything like a repaint, refresh, updateTextView or so command.
I am dealing with long strings, why I thought the UITextView would be the best way to display. However, if another UI Class, like the UITextField or UILabel would be better and easier to achieve what I am looking for, I would also use that. No problem.
In my app I update a textView programmatically. I actually loop through a dataset
Share
What exactly is your question?
Are you asking how to set text in a
UITextView? Just use itstextproperty:Are you asking if it’s “better” to use a
UILabelorUITextField? That’s a subjective question. It depends on how your app is designed and what makes the most sense for presenting textual information. (Presenting formatted HTML in aUIWebViewis another option.)Once you set the text of any of these built-in classes, it will know to update/redraw itself. You don’t need to set text and then trigger the redrawing or “repainting” manually.