Upvote:1

Aprove answer
 let indexPath = IndexPath(row: messages.count - 1, section: 0);
 yourTableView.scrollToRow(at: indexPath, at: .top, animated: false)

Credit Goes to: stackoverflow.com

Related question with same questions but different answers