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+ –