Search code examples
iosuitableviewuirefreshcontrol

Put refresh control of table at the bottom


I'm going to implement a UITableView to show older items by pulling to the bottom of table, how can I show refresh icon UIActivityIndicator at the bottom of current list?

Thanks a lot!


Solution

  • You may use open source library SVPullToRefresh which has a simple to use method:

    [tableView addInfiniteScrollingWithActionHandler:^{
        // append data to data source, insert new cells at the end of table view
        // call [tableView.infiniteScrollingView stopAnimating] when done
    }];
    

    When actionHandler block called, put your code to get older content.