I have a UITableView that has two modes. When we switch between the modes I have a different number of sections and cells per section. Ideally, it would do some cool anima
UITableView has a field called 'indexPathsForVisibleRows' that you can use to animate the visible rows using the 'reloadItemsAtIndexPaths' method.
guard let indexPaths = tableView.indexPathsForVisibleRows
else { return }
self.tableView.layoutIfNeeded()
self.tableView.reloadItemsAtIndexPaths(indexPaths, animationStyle: .automatic)