Hi,
I have a UITableViewController view a UITableView that I alloc/init with a frame of CGRectZero :
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
I want to add a view at the middle of the tableView (a loading view with a UIActivityIndicatorView and a UILabel), but I don't know how to position it, since I don't know the tableView frame.
x = (self.tableview.frame.size.width - loadingView.frame.size.width) / 2.0;
y = (self.tableview.frame.size.height - loadingView.frame.size.height) / 2.0;
[loadingView setCenter:CGPointMake(x, y)];
I did init my tableView with CGRectZero frame so it can take the whole place available on screen (which it did), but I thought its frame would update or something.
Any ideas ? Thanks !