I am reloading my tableView after fetching data from API and after reloading tableView simply does not render any cell as I see in view debugger

我与影子孤独终老i 提交于 2021-02-05 12:03:41

问题


This is my API Fetch method where I am reloading my tableview.After reloading tableview does not render any cell.

           ```
          API.shared.fetchAccomodations(completion: { (accResponse, error) in

        if let err = error {

            print("Failed to fetch accomodation Information ::" , err.localizedDescription)
        }
        if let response = accResponse {

            self.accomodationsData = response

            DispatchQueue.main.async {

                self.accomodationsData = response

                print(self.accomodationsData.count , self.accomodationsData)

                self.tableView.reloadData()

                 }

        }


      }, tokenURL: accomodationsURL)
       ```

来源:https://stackoverflow.com/questions/61204574/i-am-reloading-my-tableview-after-fetching-data-from-api-and-after-reloading-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!