In my iOS app, I have DetailController and FavoriteViewController for favorite word how to auto reload table view after added word to favorite?
it is fun to send data to my db in DetailController
@IBAction func favs(_ sender: UIButton) {
        if listMean[sender.tag].Favorite == 1 {
            listMean[sender.tag].Favorite  = 0
        }
        else {
            listMean[sender.tag].Favorite = 1
        }
        Singleton.ShareInstance.dbHelper.updateFavorite(newMean: listMean[sender.tag])
    }
it is my FavoriteViewController
import UIKit
class FavoriteViewController: UITableViewController {
        var listFavorite = [FavoriteModel]()
        var dbHelper = DatabaseHelper()
        override func viewDidLoad() {
            super.viewDidLoad()
            loadAllWords()
                   }
    func relodaTableview() {
        self.tableView.reloadData()
    }
        func loadAllWords(){
            listFavorite = dbHelper.getAllFavorite()
            tableView.dataSource = self
            tableView.delegate = self
                   }
        override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
            navigationItem.title = nil
            if segue.identifier == (Singleton.ShareInstance.enwordSelected?.Word){
                navigationItem.title = (Singleton.ShareInstance.enwordSelected?.Word)
            }
        }
        override func numberOfSections(in tableView: UITableView) -> Int {
            return 1
        }
        override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
            return listFavorite.count
        }
        override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
            let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") as! FavoriteViewCell
                cell.favoriteword = listFavorite[indexPath.row]
                return cell
        }
        override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
            return 45
        }
        override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
            Singleton.ShareInstance.favoriteSelected = listFavorite[indexPath.row]
            let des = storyboard?.instantiateViewController(withIdentifier: "DetailController")
            navigationController?.pushViewController(des!, animated: true)
        }
}