我有一个带有tableView的viewController。这个tableView有很多部分和行。当我尝试在最后一节中使用添加新行时TableView.insertRows(at:[IndexPath(row:r,section:sec)],with:.bottom)tableView滚动到顶部,并显示当前部分的第一个单元格。如何防止tableView滚动到顶部?谢谢这是我的解决方案当尝试添加单元格时,我使用此代码self.didAddNewCell=trueself.chatTableView.reloadData()self.scrollToBottom()然后添加这段代码fun