MD SHAHIDUL ISLAM
MD SHAHIDUL ISLAM

Reputation: 14523

iOS: UITableView reloadData can not refresh data

UITableView not reloading data. I am using pull to load more library to load data on scroll

I have tried

dispatch_sync(dispatch_get_main_queue(), ^{
    [self.pullTableView reloadData];
});

and

[self.pullTableView performSelectorOnMainThread:@selector(reloadData) 
                                     withObject:nil 
                                  waitUntilDone:YES];

Thanks in advance.

Upvotes: 0

Views: 144

Answers (1)

Florian Burel
Florian Burel

Reputation: 3456

reloadData won't actually fetch data of the internet or your datasource from you, it will just call back the function of numberOfSection numberOfRowInSection: and cellForRowAtIndexPath:

Before calling reload data, you should call the method that go and fetch the new content, then call reloadData

Put your entire class view controller code if you want more help.

Upvotes: 1

Related Questions