Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "Y3keLEI354YJdaIC9te84TOflqn2" = uid of person B,
- "192FDACA-84C8-49E0-A740-471922CB7C7E" = postid by person A, and
- Joe = person A
- func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
- guard orientation == .right else { return nil }
- let delete = SwipeAction(style: .destructive, title: nil) { action, indexPath in
- let savedDB = Database.database().reference().child("saved")
- let selectedPost = self.postArray[indexPath.row]
- let postid = selectedPost.postid
- savedDB.child(?????).child(postid).removeValue()
- }
- configure(action: delete, with: .trash)
- return [delete]
- }
Add Comment
Please, Sign In to add comment