iphone dev - activity indicator scroll with the table
-
01-10-2019 - |
Pergunta
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?
Solução
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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow