How to add a UIRefreshControl to a lower level UITableView?

I want to implement the pull effect for updating, but on the UITableViewbottom using UIRefreshControl?

Any ideas?

+4
source share
2 answers

It cannot be laid UIRefreshControllat the bottom in a UITableViewmanner similar to placing it on the top. But in any case, you can place everything against the background of the background presentation of the table.

But the solution that I prefer is to load additional elements when the user scrolls to the very bottom of the table. I process it with a method UITableViewControllerDelegate:

func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
    if indexPath.row == self.items.count - 1 {
        // Download more items
    }
}
+1

, :

  • , .
  • TableViews CollectionViews Datasource, . " "
0

Source: https://habr.com/ru/post/1624335/


All Articles