From def89554a53c4510b524f0c2510f0720c8c4cb34 Mon Sep 17 00:00:00 2001 From: peiyun Date: Tue, 22 Aug 2017 17:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20when=20animation=20=3D=3D=20UITableViewRo?= =?UTF-8?q?wAnimationNone=EF=BC=8C=20there=20still=20be=20animations=20bec?= =?UTF-8?q?ome=20of=20CATranscation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TLIndexPathTools/Data Model/TLIndexPathUpdates.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TLIndexPathTools/Data Model/TLIndexPathUpdates.m b/TLIndexPathTools/Data Model/TLIndexPathUpdates.m index 4a67461..2d99529 100644 --- a/TLIndexPathTools/Data Model/TLIndexPathUpdates.m +++ b/TLIndexPathTools/Data Model/TLIndexPathUpdates.m @@ -173,6 +173,9 @@ - (void)performBatchUpdatesOnTableView:(UITableView *)tableView withRowAnimation return; } + if (animation == UITableViewRowAnimationNone) { + [UIView setAnimationsEnabled:NO]; + } [CATransaction begin]; [CATransaction setCompletionBlock: ^{ @@ -283,6 +286,9 @@ - (void)performBatchUpdatesOnTableView:(UITableView *)tableView withRowAnimation [tableView endUpdates]; [CATransaction commit]; + if (animation == UITableViewRowAnimationNone) { + [UIView setAnimationsEnabled:YES]; + } } - (void)performBatchUpdatesOnCollectionView:(UICollectionView *)collectionView