Friday 15 February 2013

ios - Calling delegate method from thread error -


When I send a network request on networking, I get a complete block of results. In this section I tell the view controller to see the data using the parse and representative of that class.

The VC calls the re-view to the table view. The only thing is that if I use a representative reload, the data is hit or miss (sometimes it works) but if I post a notification it works perfectly.

I think this representative is being called from the former networking block because it is on a separate thread. I do not keep there, but I think that AFN has automatically requested itself.

Why is this problem happening?

@ Durga Prasad may be correct, but it is still to add some conditions in it. Try,

  if ([NSThread isMainThread]) {[self.tableView reloadData]; } And {{self.tableView Display SelectorMonthththit: Object with @Selector (reloaded data): Zero WaitUnuit Don: Yes]; }    

No comments:

Post a Comment