如何在swift中更改UITableViewCell的位置?

如何在swift中更改UITableViewCell的位置?,swift,uitableview,Swift,Uitableview,不是通过做下面的事情,而是去发现 self.tableView.moveRowAtIndexPath(indexPath,toIndexPath: NSIndexPath(index:0)) 谢谢tableView的indexPath应该使用 NSIndexPath(forRow: 0, inSection: 0) 在这种情况下 tableview确实需要有关您所在分区的信息

不是通过做下面的事情,而是去发现

self.tableView.moveRowAtIndexPath(indexPath,toIndexPath: NSIndexPath(index:0))

谢谢

tableView的indexPath应该使用

NSIndexPath(forRow: 0, inSection: 0)
在这种情况下

tableview确实需要有关您所在分区的信息