title: Updating a UITableView on Firebase Data Change
body: <p>So I am trying to have table cells that auto refresh when any other of the cells are changed. I hoped that my code could find the object within the table array, change a value, and refresh the table view all in one fell swoop, but for some reason, even though my array updates, the table refuses to instantly update. To see my new values I have to restart the app or reopen the View.</p>
  
  <p>This is what I am doing so far:</p>
  
  <pre><code>usersRef.queryOrdered(byChild "contactList/(currentUID!)").queryEqual(toValue: true).observe(.childChanged, with: { (snapshot) in
  if let friends = snapshot.value as? [String: AnyObject] {
  
              //Making a new updated contact
  
              let name = friends["name"] as! String
              print(name)
              let edit = Contact()
              edit.name = name;
              edit.isSafe = friends["isSafe"] as! Bool
              edit.email = friends["email"] as! String
  
              //My manager object has a custom array objects called contacts. 
              self.manager.index(withName: name, contact: edit)
              self.tableView.reloadData();
          } else {
              print("Failed to Convert")
          }
      })
  
  }
  </code></pre>
  
  <p>index(withName: String, contact: Contact) method in the ContactManager:</p>
  
  <pre><code>//This method goes through the contactList to check names to see which contact has a specific name equal to "name", then it uses the "contact" to update that specific child.
  
      public mutating func index(withName: String, contact: Contact) {
      for iterator in 0 ..&lt; contactList.count {
          if (contactList[iterator].name == withName) {
              contactList[iterator] = contact
          }
      }
  }
  </code></pre>