I wanted to know the difference between these. The tableView method & the UITableViewController method.
tableView.moveRow(at:, to:)
tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath)
Wanted to know the difference and when to use them, cause I used the tableView.moveRow(at: SourceIndexPath, to: DestinationIndexPath) inside the tableView(tableView:, moveRowAt:, to:). But the App crashes.
Would appreciate the help.
Crash Error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (1 moved in, 0 moved out).
NSFetchedResultsController? - user1046037