iPhone: UITableView Becomes Invisible after Changing the Data it Displays
- by Alexander Shemshurenko
Hi
I have application with a TabBar that controls several views. In one view, I control connections to different servers. Each server provides a different set of items.
I display these items in UITableView on another view.
The problem is that the tableview displays OK the first time but if I go back to view number one and change the server, thereby changing the list of items that should be displayed in tableview, the tableview becomes invisible for some reason. If I tap on the screen in the place where it should be, it becomes visible again.
I create table view like this
UITableView * aTableView = [[UITableView alloc] initWithFrame:CGRectMake(X,Y,Width,Height) style:UITableViewStyleGrouped];
[[self view] addSubview:aTableView];
aTableView.dataSource = self;
Ive tried to call reloadData and setNeedsDisplay in viewWillAppear of the UIViewController that hosts this tableview but without success.
Any advice?
Thanks