iPhone: UITableView Becomes Invisible after Changing the Data it Displays
Posted
by Alexander Shemshurenko
on Stack Overflow
See other posts from Stack Overflow
or by Alexander Shemshurenko
Published on 2010-04-13T11:26:30Z
Indexed on
2010/04/13
14:13 UTC
Read the original article
Hit count: 377
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
© Stack Overflow or respective owner