- (void)refresh { MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(getData)]; NSMutableArray *images = [NSMutableArray array]; for (int i = 1; i < 17; i++) { UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"Load_%d", i]]; [images addObject:image]; } // Set the ordinary state of animated images [header setImages:images forState:MJRefreshStateIdle]; // Set the pulling state of animated images(Enter the status of refreshing as soon as loosen) [header setImages:images forState:MJRefreshStatePulling]; // Set the refreshing state of animated images [header setImages:images forState:MJRefreshStateRefreshing]; header.lastUpdatedTimeLabel.hidden = YES; header.stateLabel.hidden = YES; // Set header self.tableview.mj_header = header; }
时间: 2024-10-12 11:29:38