table.beginUpdates()
array.removeLast()
table.deleteRowsAtIndexPaths([anIndexPath], withRowAnimation: UITableViewRowAnimation.None)
for object in container {
array.append(object)
}
array.append("New Object")
table.insertRowsAtIndexPaths([Set of IndexPaths]), withRowAnimation: UITableViewRowAnimation.Fade)
table.endUpdates()
我正在使用上面的代碼。它工作正常,但唯一的問題是動畫。執行上面的代碼行後,表格視圖滾動位置設置爲頂部。不知道如何。受到歡迎。UITableView動畫無法正常工作
是否使用'控制器上self.tableView.estimatedRowHeight'方法幫你嗎?這種方法之前我有同樣的問題。 – thedjnivek
您是否僅在iOS 8中遇到此問題? – Skywalker
@MeharoofNajeeb我的應用程序僅支持iOS 9+ –