I have a UITableViewController to view the UITableView, which I highlight / init with the CGRectZero framework:
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
I want to add a view in the middle of the View table (loading view using UIActivityIndicatorView and UILabel), but I don't know how to position it, since I don't know the frame of the tableView.
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 initialized my tableView with the CGRectZero framework so that it could display all the place on the screen (which he did), but I thought that its frame would be updated or something else.
Any ideas? Thank!
source
share