Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var numberOfRecords:Int = 0
- func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
- if editingStyle == .delete {
- try? FileManager.default.removeItem(at: getDiretory().appendingPathComponent("(indexPath.row - 1).m4a"))
- UserDefaults.standard.removeObject(forKey: "myNumber")
- tableView.deleteRows(at: [indexPath], with: .fade)
- tableView.reloadData()
- }
- }
Add Comment
Please, Sign In to add comment