Question

In a view of my app I subclass tableViewController and has an activity indicator shown up when the table content is loading. I put it in the center of the screen but it scroll with the tableView (I guess the reason is I add it as a subview of the table view). Is there a way that I can keep the activity indicator in the center of the screen even the table is scrolling?

Was it helpful?

Solution

You could either subclass a UIViewController instead, and set a table property, adding a UITableView as a subclass to the UIView, making it behave exactly like a UITableViewController.

Or, more simply, you could just add the UIActivityIndicator as a subview to the main window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top