SVPullToRefresh.h
//第一次進來時獲得數據刷新表
[self requestData];
//添加下拉刷新功能
//使用__weak循環引用防止
__weak FirstViewController *vc = self;
[_tableView addPullToRefreshWithActionHandler:^{
[vc requestData];
}];
//當加載數據完成后,手動停止下拉刷新動畫
[self.tableView.pullToRefreshView stopAnimating];
//添加上拉加載更多數據
[_tableView addInfiniteScrollingWithActionHandler:^{
[vc loadMoreData];
}];
//刷新完成后停止動畫
[self.tableView.infiniteScrollingView stopAnimating];