Closed ivoryxiong closed 10 years ago
in sample project, when RefreshActionHandler is not insertRowAtTop but reloadTableViewData , which logic just like :
- (void)reloadTableViewData { __weak typeof(self) weakSelf = self; [[HttpManager sharedManager] Get:@"http://example.com/api/list" successHandler:^(id data) { [weakSelf.tableView reloadData]; [weakSelf.tableView stopRefreshAnimation]; }]; }
if we drag tableview quickly and the api response fast, then RefreshActionHandler may called multiple times, because tableView have no method/delegate tell us "reloadData" has finished, so stopRefreshAnimation can not be call appropriately!
in sample project, when RefreshActionHandler is not insertRowAtTop but reloadTableViewData , which logic just like :
if we drag tableview quickly and the api response fast, then RefreshActionHandler may called multiple times, because tableView have no method/delegate tell us "reloadData" has finished, so stopRefreshAnimation can not be call appropriately!