Ios 表拉刷新不工作

Ios 表拉刷新不工作,ios,Ios,当我刷新表格时,它是不刷新的,并且不在屏幕上显示圆圈。 这是我的代码:- refreshControl = [[UIRefreshControl alloc]init]; [self.tableHolidays addSubview:refreshControl]; [refreshControl addTarget:self action:@selector(refreshTable) forControlEvents:UIControlEventValueChanged]; - (vo

当我刷新表格时,它是不刷新的,并且不在屏幕上显示圆圈。 这是我的代码:-

refreshControl = [[UIRefreshControl alloc]init];

[self.tableHolidays addSubview:refreshControl];

[refreshControl addTarget:self action:@selector(refreshTable) forControlEvents:UIControlEventValueChanged];

- (void)refreshTable {
    [refreshControl endRefreshing];
    [self.tableHolidays reloadData];
} 

尝试交换序列

- (void)refreshTable {

    [self.tableHolidays reloadData];
    [refreshControl endRefreshing];
} 

首先在刷新时完成表上的所有操作,然后结束刷新

-空刷新表{ [self.tableHolidays重载数据]; [刷新控制结束刷新];
}

重新加载数据后尝试EndRefresh。[self.tableView重载数据];[自我刷新控制结束刷新]@Suhailkalathil这没关系,问题是refreshTable func中的代码,他提供的代码根本没有任何作用,当调用2行时,没有圆圈可以神奇地出现,至少必须给出该图形或代码,你的tableview比它的框架更简单?我指的是数量rows@Tj3n.. 这个怎么样。。self.refreshControl=[[UIRefreshControl alloc]init];[self.refreshControl addTarget:self action:@selectorrefresh:forControlEvents:UIControlEventValueChanged];[self.tableView addSubview:self.refreshControl];}-voidrefresh:UIRefreshControl*refreshControl{[self downloadFeed];}-voiddownloadFeed{[self.tableView重载数据];[self.refreshControl EndRefresh];}
- (void)viewDidLoad 
{
    [super viewDidLoad];
    UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
    [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
    [self.tableView addSubview:refreshControl];
}

- (void)refresh:(UIRefreshControl *)refreshControl
{
    // Do your stuff here, when done:
    [refreshControl endRefreshing];
}