Found my solution!
override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationsForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let deleteAction = UIContextualAction(style: .destructive, title: "Delete") { (action, sourceView, completionHandler) in
if let appDelegate = (UIApplication.shared.delegate as? AppDelegate) {
let context = appDelegate.persistentContainer.viewContext
let inspectionsToDelete = self.fetchResultController.object(at: indexPath)
context.delete(inspectionsToDelete)
appDelegate.saveContext()
}
completionHandler(true)
}