IOS 下拉刷新--downPullRefreshView

//导入我的 commom 包
#import "SVPullToRefresh.h"
////////////////下啦刷新--
-(void)downRefreshView{
    [self.m_tableView addPullToRefreshWithActionHandler:^{
        [self.m_tableView.pullToRefreshView performSelector:@selector(stopAnimating) withObject:nil afterDelay:2];
        [self performSelectorOnMainThread:@selector(myTask) withObject:nil waitUntilDone:NO];
    }];
    
    // trigger the refresh manually at the end of viewDidLoad
    [self.m_tableView.pullToRefreshView triggerRefresh];
}
-(void)myTask
{
    iListCountNum=1;
    isEndList=NO;
    
    m_tieziList = [g_data GetTieziList:m_forumNode->forum_id pageSize:9 pageNum:1];
    [self performSelectorOnMainThread:@selector(ReloadCollectionData:) withObject:nil waitUntilDone:NO];
}
-(void)ReloadCollectionData:(id)sender
{
    [self.m_tableView reloadData];
}

你可能感兴趣的:(IOS 下拉刷新--downPullRefreshView)