Unable to update UITableView

后端 未结 2 2026
小鲜肉
小鲜肉 2021-02-03 15:02

I have UITableViewController as the RootViewController. I need to add rows to the table depending on data I get from another thread which I initiate from the RootViewController\

2条回答
  •  梦谈多话
    2021-02-03 15:38

    Make sure you have the correct values being returned from numberOfRowsForSection for starters.

    Also make sure your cellForRowAtIndexPath method is using this data to get the cell contents.

    Your reloadData method should be called on the main thread, not on any other thread.

    Will be able to help you better if you can post the relevant code.

提交回复
热议问题