title: Tableview not reloading data in xcode 9.3
body: <p>When I call <code>self.tableview.reloadData()</code> it isn't working. This code is only one time working . I searched a lot but could not find the solution.</p>
  
  <pre><code>import UIKit
  import FirebaseStorage
  import FirebaseDatabase
  import FirebaseAuth
  import FirebaseCore
  import SDWebImage
  
  class bags : UIViewController, UITableViewDelegate, UITableViewDataSource {
  
      @IBOutlet weak var tableView: UITableView!
  
      var postCommentArray = [String]()
      var useremailArray = [String]()
      var postImageURLArray = [String]()
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          getDataFromServer()
  
      }
  
      func getDataFromServer() {
          Database.database().reference().child("users").observe(DataEventType.childAdded) { (snapshot) in
  
              let values = snapshot.value! as! NSDictionary
  
              let post = values["post"] as! NSDictionary
  
              let postIDs = post.allKeys
  
              for id in postIDs {
  
                  let singlePost = post[id] as! NSDictionary
  
                  self.useremailArray.append(singlePost["postedby"] as! String)
                  self.postCommentArray.append(singlePost["posttext"] as! String)
                  self.postImageURLArray.append(singlePost["image"] as! String)
  
              }
  
                  self.tableView.reloadData()
  
          }
  
      }
  
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return useremailArray.count
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TableView
  
          cell.postImage.sd_setImage(with: URL(string: self.postImageURLArray[indexPath.row]))
          cell.tarhanaIlk.text = postCommentArray[indexPath.row]
          return cell
      }
  
  }
  </code></pre>
  
  <p>**Here is the tableview cell code.3 days before is working but now not working. If necessary podfile i can share. Also i tried  DispatchQueue.main.async {
                  self.tableView.reloadData()
              }               **enter code here </p>
  
  <pre><code>import UIKit
  
  class TableView: UITableViewCell {
  
      @IBOutlet weak var tarhanasonLabel: UILabel!
      @IBOutlet weak var postImage: UIImageView!
      @IBOutlet weak var tarhanaIlk: UITextView!
  
  
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
      }
  
      override func setSelected(_ selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
  
          // Configure the view for the selected state
      }
  
  }
  </code></pre>
  
  <p><strong>This part is the adding the data to my firebase storage</strong> </p>
  
  <p>import Foundation
  import UIKit
  import FirebaseStorage
  import FirebaseDatabase
  import FirebaseAuth
  import FirebaseCore</p>
  
  <p>class File : UIViewController {</p>
  
  <pre><code>var baslangicDegeri = 0
  var iskembeadet = 0
  var mercimekadet = 0
  var ezogelinadet = 0
  var domatesadet = 0
  var sehriyeadet = 0
  var etliturluadet = 0
  var hamburgeradet = 0
  var kanatadet = 0
  var pizzaadet = 0
  var etsoteadet = 0
  var alabalikadet = 0
  var uuid = NSUUID().uuidString
  
  
  
  @IBOutlet weak var tarhanaadetlabel: UILabel!
  @IBOutlet weak var iskembeadetlabel: UILabel!
  @IBOutlet weak var mercimekadetlabel: UILabel!
  @IBOutlet weak var ezogelinadetlabel: UILabel!
  @IBOutlet weak var domatesadetlabel: UILabel!
  @IBOutlet weak var sehriyeadetlabel: UILabel!
  
  
  
  @IBOutlet weak var etliturluadetlabel: UILabel!
  @IBOutlet weak var hamburgeradetlabel: UILabel!
  @IBOutlet weak var kanatadetlabel: UILabel!
  @IBOutlet weak var pizzaadetlabel: UILabel!
  @IBOutlet weak var etsoteadetlabel: UILabel!
  @IBOutlet weak var alabalikadetlabel: UILabel!
  
  
  
  @IBOutlet weak var postImage: UIImageView!
  @IBOutlet weak var postImageiskembe: UIImageView!
  @IBOutlet weak var postImagemercimek: UIImageView!
  @IBOutlet weak var postImageezogelin: UIImageView!
  @IBOutlet weak var postImagedomates: UIImageView!
  @IBOutlet weak var postImagesehriye: UIImageView!
  
  
  
  @IBOutlet weak var postImageetliturlu: UIImageView!
  @IBOutlet weak var postImagehamburger: UIImageView!
  @IBOutlet weak var postImagekanat: UIImageView!
  @IBOutlet weak var postImagepizza: UIImageView!
  @IBOutlet weak var postImageetsote: UIImageView!
  @IBOutlet weak var postImagealabalik: UIImageView!
  
  
  
  
  
  
  
  override func viewDidLoad() {
  
      super.viewDidLoad()
  }
  
  
  
  @IBAction func tarhanaEkle(_ sender: Any) {
  
  
          let mediaFolder = Storage.storage().reference().child("media")
  
          if let data = UIImageJPEGRepresentation(postImage.image!, 0.5) {
  
              mediaFolder.child("\(uuid).jpg").putData(data, metadata: nil, completion: { (metadata, error) in
                  if error != nil {
                      let alert = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: UIAlertControllerStyle.alert)
                      let okButton = UIAlertAction(title: "OK", style: UIAlertActionStyle.cancel, handler: nil)
                      alert.addAction(okButton)
                      self.present(alert, animated: true, completion: nil)
                  } else {
  
                      let imageURL = metadata?.downloadURL()?.absoluteString
  
                      let post = ["image" : imageURL!, "postedby" : Auth.auth().currentUser!.email!, "uuid" : self.uuid, "posttext" : self.tarhanaadetlabel.text as Any] as [String : Any]
                      Database.database().reference().child("users").child((Auth.auth().currentUser?.uid)!).child("post").childByAutoId().setValue(post)
  
                      self.postImage.image = UIImage(named: "select.png")
                      self.tarhanaadetlabel.text = ""
                      self.tabBarController?.selectedIndex = 0
  
                  }
  
  
  
              })
          }
  
  
  
      }
  
  
  
  
  
  @IBAction func eksibuton(_ sender: Any) {
      if (baslangicDegeri &gt; 0 ) {
          baslangicDegeri -= 1
          tarhanaadetlabel.text = String(baslangicDegeri)
          tarhanaadetlabel.text = "ADET : \(baslangicDegeri) "
      }
  }
  
  
  @IBAction func artibuton(_ sender: Any) {
  
      baslangicDegeri += 1
      tarhanaadetlabel.text = String(baslangicDegeri)
      tarhanaadetlabel.text = "ADET : \(baslangicDegeri) "
      }
  </code></pre>