UITableView bouncing back to the top of a section when calling reloadRowsAtIndexPaths

后端 未结 9 1904
既然无缘
既然无缘 2020-12-15 03:14

When a user taps a button in one of my rows I am updating the underlying model for that row and then calling reloadRowsAtIndexPaths for the given row (i.e. single row reload

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 04:11

    It may be possible to put the cell in it's own section and call reload section:

    [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationFade];
    

    this appears to fix the issue partially. Not the cleanest way but it may work for you.

提交回复
热议问题