I wonder if anyone else is facing the same issue. I have a UITextView field placed in a UITableViewCell. Sometimes it does not displays the text. When i click or scroll the table view, it appears. Any guesses?
views:
1533answers:
4Details:
I call a method in viewDidLoad method that calls a web service to retrieve some data. On receiving the data, i set the values of UILabel and UITextView. UILabel values appear fine, but the UITextView (sometimes) do not show the value until i move to subview or scroll up and down to revisit the area contaning UITextView. I'm showing UILabel and UITextView objects in UITableViewCell. I call [tableView reloadData] right after setting values in UILabel and UITextView, but i do not re-create the UITableViewCell.
Thanks for your reply and pointers.
This might have something to do with the fact that UITextView and UITableView are both subclasses of UIScrollView. So you have a scroll view inside of a scroll view, and it wouldn't surprise me if that was the cause of your problems.
If you don't need to edit the text within the table, just use a multi-line UILabel.
If you absolutely have to have a UITextView inside a UITableView, perhaps disabling scrolling on one of them might also fix the problem. (I think the property name is scrollEnabled
or scrollingEnabled
.)
Same problem. I'm solve it by calling [myTableView reloadData];
Make sure that you're calling [super viewWillAppear:]
and [super viewDidAppear:]
in all the places where you override viewWillAppear or viewDidAppear.
Probably true of all the other viewDidWhatever and viewWillWhatever methods as well.
The problem you're having suggests that the UITextView isn't getting the message to draw itself on the screen when you're first displaying the table but does get the message when it needs to refresh.