[tableView reloadData]; doesn't work until I scroll the tableView

后端 未结 5 1848
南方客
南方客 2021-02-01 18:57

I have a simple app that downloads search results in XML when the user types in a UISearchBar. The download+parsing is threaded and once done it fires an NSNo

5条回答
  •  孤街浪徒
    2021-02-01 19:28

    I was able to get the same thing to work. But the issue was that the reload data needed to be called on main thread.

    dispatch_async(dispatch_get_main_queue(), ^{
        [self.tableView reloadData];
    });
    

    I think this is more practical than the performSelectorOnMainThread option

提交回复
热议问题