UITableViewRowAnimation is ignored

后端 未结 5 1384
感动是毒
感动是毒 2020-12-16 07:27

I\'m using NSFetchedResultsController to populate my table. The data in my table is sorted according to the timestamp in the ascending order (latest message at

5条回答
  •  醉梦人生
    2020-12-16 08:05

    As of iOS 7.0, you can wrap the code in a performWithoutAnimation: block, like so:

    [UIView performWithoutAnimation:^{
                        [self.tableView beginUpdates];
                        [self.tableView deleteRowsAtIndexPaths:rowsToRemove withRowAnimation:UITableViewRowAnimationNone];
                        [self.tableView endUpdates];
                    }];
    

提交回复
热议问题