快速下拉刷新动画
-(void)setupTableview{ //添加下拉的动画图片 //设置下拉刷新回调 [self.tableView addGifHeaderWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; //设置普通状态的动画图片 NSMutableArray *idleImages = [NSMutableArray array]; for (NSUInteger i = 1; i<=60; ++i) { // UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"dropdown_anim__000%zd",i]]; // [idleImages addObject:image]; UIImage *image = [UIImage imageNamed:@"icon_listheader_animation_1"]; [idleImages addObject:image]; } [self.tableView.gifHeader setImages:idleImages forState:MJRefreshHeaderStateIdle]; //设置即将刷新状态的动画图片 NSMutableArray *refreshingImages = [NSMutableArray array]; UIImage *image1 = [UIImage imageNamed:@"icon_listheader_animation_1"]; [refreshingImages addObject:image1]; UIImage *image2 = [UIImage imageNamed:@"icon_listheader_animation_2"]; [refreshingImages addObject:image2]; [self.tableView.gifHeader setImages:refreshingImages forState:MJRefreshHeaderStatePulling]; //设置正在刷新是的动画图片 [self.tableView.gifHeader setImages:refreshingImages forState:MJRefreshHeaderStateRefreshing]; //马上进入刷新状态 [self.tableView.gifHeader beginRefreshing]; }