TableView does not show data

前端 未结 2 998
梦谈多话
梦谈多话 2020-12-07 06:09

I am trying to fill my UITableView with some data I receive from a GET request. I don\'t know why but if in my numberOfRowsInSection, I return an s

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 06:42

    Swift solution:

    tableView.reloadData()
    

    If you are calling it not from the main thread:

    DispatchQueue.main.async {
        self.tableView.reloadData()
    }
    

提交回复
热议问题