UITableView中cell比较高的时候insertRow和deleteRow动画不连贯

图片描述

问题如图中展示那样, 感觉好像动画在完成默认高度的动画后,超出部分就直接消失掉了。。。

插入删除row代码如下:

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:1 inSection:0];
    
    [self.tableView beginUpdates];
    
    if (_signatureOpen) {
        [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];
    } else {
        [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];
    }
    
    
    [self.tableView endUpdates];
阅读 3.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进