contentoffset

How to keep UITableView contentoffset after calling -reloadData

僤鯓⒐⒋嵵緔 提交于 2019-11-26 09:06:51
问题 CGPoint offset = [_table contentOffset]; [_table reloadData]; [_table setContentOffset:offset animated:NO]; //unuseful // __block UITableView *tableBlock = _table; // [self performBlock:^(id sender) { // [tableBlock setContentOffset:offset]; // } afterDelay:2]; I know don\'t know of any delegate method which gets called after reloadData . And using afterDelay:2 which is kind of a hack may be too short or too long, so how can I implement it? 回答1: I was recently working with reloadData --