swift4

delete tableView cell, and remove data from firebase

只愿长相守 提交于 2020-08-09 21:42:08
问题 I'm new to swift and firebase. Done some research here, could not find solution that would solve my problem, lack of experience. Got a problem when trying to delete tableView Cell from firebase "Value of type 'Group' has no member 'ref'" func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { let ref = groupsArray[indexPath.row].ref ref!.removeValue() groupsArray.remove(at: indexPath.row)