When I remove all object from tableview and with animation reload tableview at that time tableview getting flicker.
I am doing something like this:
-(void)viewDidLoad {
[super viewDidLoad];
self.voiceSTableView.voicestationDelegate = self;
refreshControl = [[UIRefreshControl alloc] init];
[refreshControl addTarget:self action:@selector(getRefreshData) forControlEvents:UIControlEventValueChanged];
UITableViewController *tableViewController = [[UITableViewController alloc] init];
tableViewController.tableView = self.voiceSTableView ;
tableViewController.refreshControl = refreshControl;
self.voiceSTableView.refreshController = refreshControl;
}
-(void)getRefreshData{
if(isRequestLoading){
[refreshControl endRefreshing];
return;
}
[self.voiceSTableView.arVoicerData removeAllObjects];
[UIView animateWithDuration:0 animations:^{
[self.voiceSTableView reloadData];
} completion:^(BOOL finished) {
}];
}
even this code also not working :
[self.voiceSTableview reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];