i have a table and custom cells created dynamically, i have a http asyn call which gets me JSON data, now i need to update the table cells with the data received...
Call:
[self.tableView reloadData];
Have to NSNotification, one in the loadview and another one in the
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
delegate method , like this:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateTable) name:@"downloadCompleted" object:nil];
The above one in loadview method and the following one in the delegate
[[NSNotificationCenter defaultCenter] postNotificationName:@"downloadCompleted" object:nil];
the updateTable method will be called once data is obtained from JSON parsing. You can call the reloadData method of the tableview in this method to fill the tableview with obtained values.... Hope this helps.. Cheers...Happy coding..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With