我正在寻找一种简单的实现,可以将{Core}中的重排序单元格保存在UITableViewController
中。
现在我正在使用默认功能对单元格进行重新排序:
var timers: [Timers] = []
override func tableView(_ tableView: UITableView,moveRowAt sourceIndexPath: IndexPath,to destinationIndexPath: IndexPath) {
let movedObject = timers[sourceIndexPath.row]
timers.remove(at: sourceIndexPath.row)
timers.insert(movedObject,at: destinationIndexPath.row)
}
如何实现用于保存单元格订购功能的核心数据?