草庐IT

fromIndexPath

全部标签

ios - 如何在 swift 中使用 fetchedresultscontroller 重新排序 tableview 行?

我正在尝试使用核心数据和nsfetchresultscontroller对表格View中的单元格进行重新排序。我找到了一些使用objective-c(我对此一无所知)来执行此操作的方法,并尝试快速实现它们,这是我想出的:varbooks:Array=[]//Overridetosupportrearrangingthetableview.overridefunctableView(tableView:UITableView,moveRowAtIndexPathfromIndexPath:NSIndexPath,toIndexPath:NSIndexPath){books=fetched