title: how to delete firebase with tableView cell SWIFT
body: <p>Hi I am trying to delete a test post I made on firebase using siwft but the code that I am using deletes ALL of the posts and I am only wanting to delete 1 post that was selected. In the picture below I am wanting to delete where the red arrow is pointing to specifically. </p>
  
  <p>This code shows how it stores to Firebase. </p>
  
  <pre><code>guard let prof = uServe.currentUserProfile else {return}
  
      let postRef = Database.database().reference().child("posts").childByAutoId()
  
      let pObj = [
          "author": [
  
              "uid": prof.uid,
              "name": prof.name,
              "photo": prof.photo.absoluteString
  
                ],
        "text": textView.text,
              "timestamp": [".sv":"timestamp"]
          ] as [String:Any]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TtCs2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TtCs2.png" alt="want to delete the red arrow, not the whole posts library"></a></p>
  
  <pre><code> func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
  
  
  
  if editingStyle == .delete {
  self.theposts.remove(at: indexPath.row)
      tableView.deleteRows(at: [indexPath], with: .left)
      Database.database().reference().child("posts").childByAutoId().removeValue()
  }
  }
  </code></pre>