TableView does not show data

前端 未结 2 993
梦谈多话
梦谈多话 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()
    }
    
    0 讨论(0)
  • 2020-12-07 06:50

    You must reload table view data after receiving request with

    [self.tableView reloadData];
    
    0 讨论(0)
提交回复
热议问题