views:

476

answers:

0

I'm doing something that requires storing some text entered in a UITextView. It all works fine until the text is restored, then it is not wrapped in the UITextView (like it did when it was entered) but is truncated (just like a UITableViewCell does by default, tail truncation).

Once the text is in the UITextView, it is saved to a Core Data managed object with

self.note.text = textNoteTableView.text;

On creating the UITextView (which lives in a custom UITableViewCell)

UITextView *textView = (UITextView*)[cell viewWithTag:1];
textView.text = self.note.text;

The text seems fine and I can catch it being saved and being restored OK in the debugger. What I need to have happen is for the text to be displayed in the UITextView just like it was when originally entered, wrapped and not truncated. I have not set any properties on this object so I can't work out why it is not just behaving the way it would when a keyboard is the data source, or when it is restored from xib if I leave in the Lorem ipsum dolor default text.