Q: Continue loading view after method loads from external URL I have a method to retrieve data from an external url, load it into an array from JSON format, and populate a UITableView.  It works fine, but there is no indication to the user that something is happening while the data is downloaded.
- (void)viewDidLoad
{
    [super viewDidLoad];
    [self retrieveDataC];

}

Here is the code that I tried for viewDidLoad which adds a spinner animation while downloading.  I'm attempting to put retrieveDataC on a background thread and when it completes, I would like the view to continue executing as though I didn't implement the multi-threading in the example above.
- (void)viewDidLoad
{
    [super viewDidLoad];

    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    spinner.center = CGPointMake(160, 240);
    [self.view addSubview:spinner];
    [spinner startAnimating];

    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        [self retrieveDataC];
        dispatch_async(dispatch_get_main_queue(), ^{
        [spinner stopAnimating];
        });
    });

}

The loading spinner displays correctly for a brief moment, however after the process is done I'm left with a blank table as though I have not called [self retrieveDataC] to begin with.  Any suggestions, advice?  Am I setting up the background process correctly?
Thank you
EDIT: 
Here's what ended up working -
- (void)viewDidLoad
{
    [super viewDidLoad];

    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    spinner.center = CGPointMake(160, 240);
    [self.view addSubview:spinner];
    [spinner startAnimating];

    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        [self retrieveDataC];
        dispatch_async(dispatch_get_main_queue(), ^{
        [spinner stopAnimating];
        [self.collectionView reloadData];
        });
    });

}


A: Do you call [self.tableView reloadData] after you received the data?
