Reload tableview section without scroll or animation
To prevent scrolling and animation, do this:
UIView.performWithoutAnimation {
let loc = tableView.contentOffset
tableView.reloadRows(at: [indexPath], with: .none)
tableView.contentOffset = loc
}
Try this:
UIView.setAnimationsEnabled(false)
self.tableView.beginUpdates()
self.tableView.reloadSections(NSIndexSet(index: 1) as IndexSet, with: UITableViewRowAnimation.none)
self.tableView.endUpdates()
Swift 4:
Actually, the best way to prevent crazy animation during scrolling or expand/collapse cells is:
UIView.performWithoutAnimation {
self.tableView.reloadRows(at: [indexPath], with: .none)
}