UIView on the center of UITableViewController

ios, iphone, objective-c, uitableview, uiview

Solution

You can add the view to the superview of the tableview, like this:

loadingView.center = self.tableView.center;
[self.tableView.superview addSubview:loadingView];

and remove it (removeFromSuperview) when you are done with it. It will appear on top of the table, centered to the table, but won't scroll with the table.

Problem

How can I put my UIView (`loadingView`), which was loading from UITableViewController on the center of screen, regardless of the position of the scroll?

Original source