Search code examples
iosswiftuitableviewz-index

Pull to refresh text is placed above tableview


I am trying to have my entire refreshControl placed behind the tableview. I am able place the actual spinner by doing this:

  self.tableView.addSubview(refreshControl)
  self.tableView.sendSubview(toBack: refreshControl)

The only issue is the text associated with the spinner is placed on top of the tableview.


Solution

  • Try this:

    self.tableView.backgroundView = refreshControl