Add view over tableview (UITableViewController)

前端 未结 8 2054
[愿得一人]
[愿得一人] 2020-12-09 10:39

Situation: I\'ve got a UITableViewController loading some data asynchronously from a service. During this time I would like to place a full screen (except n

8条回答
  •  独厮守ぢ
    2020-12-09 11:19

    The issue is that the View of a UITableViewController is a UITableView, so you cannot add subviews to the controller on top of the table.

    I'd recommend switching from a UITableViewController to a simple UIViewController that contains a UITableView. This way the controller main view is a plain UIView that contains a table, and you can add subviews to the main UIView and they will be placed on top of the table view.

提交回复
热议问题