//下拉刷新
-(void)refresh{
control = [[UIRefreshControl alloc]init];
//通过target方法
[control addTarget:self action:@selector(change) forControlEvents:UIControlEventValueChanged];
[_tableView addSubview:control];
}
//开始刷新,在里面加载最新的数据
-(void)change{
//1.加载数据,判断以及将新的数据插入旧的数据前面
//2.加载完毕,关闭刷新
[control endRefreshing];
//3.在失败时也要关闭
NSLog(@"正在下拉");
}