different way to update

This commit is contained in:
Pfeil, Scott Robert 2019-07-23 11:57:03 -04:00
parent 482c6c4fab
commit 6537523373

View File

@ -110,8 +110,9 @@ open class MoleculeListTemplate: ThreeLayerTableViewController {
open override func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) {
if let tableView = tableView {
let point = molecule.convert(molecule.bounds.origin, to: tableView)
if let indexPath = tableView.indexPathForRow(at: point) {
tableView.reloadRows(at: [indexPath], with: .automatic)
if let indexPath = tableView.indexPathForRow(at: point), tableView.indexPathsForVisibleRows?.contains(indexPath) ?? false {
tableView.beginUpdates()
tableView.endUpdates()
}
}
}