Fix crash when updating UITableViewCells in iOS 12
In iOS 12, calling [UITableView reloadRowsAtIndexPaths:withRowAnimation:] inside the completion handler of [UITableView performBatchUpdates:completion:] may trigger a crash. The workaround is to get UITableViewCell via [UITableView cellForRowAtIndexPath:] and then reconfigure the cell directly. This will lose the built-in animation from UIKit when cells are updated. Once iOS 12 is deprecated, remove this workaround and use [UITableView reloadRowsAtIndexPaths:withRowAnimation:]. Bug: 1028074 Change-Id: Ida4fbf94f31b7b00cb9052177f3350c60ae9e4e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936487Reviewed-by:Gauthier Ambard <gambard@chromium.org> Commit-Queue: Yi Su <mrsuyi@chromium.org> Cr-Commit-Position: refs/heads/master@{#719135}
Showing
Please register or sign in to comment