Add view over tableview (UITableViewController)

前端 未结 8 2050
[愿得一人]
[愿得一人] 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:14

    You can use self.navigationController.view as view for adding subview.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题