user27805
0
Q:

tap to delete xcode

   override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
        let hello = hellos[indexPath.row]
        if let context = (UIApplication.shared.delegate as? AppDelegate)?.persistentContainer.viewContext {
            context.delete(hello)
            (UIApplication.shared.delegate as? AppDelegate)?.saveContext()
            loadData()
        }
        
    }
0

New to Communities?

Join the community