Reputation: 65
I am programming an iPhone app. Now i want to download the contents of a text file and display them in a view.
The problem is that the view loads faster than the NSURLConnection
can download the data. Is there a way to wait for the download before displaying the view?
Upvotes: 2
Views: 376
Reputation: 14427
You could try [NSURLConnection sendSynchronousRequest: request returningResponse: response error: &error];
A better solution would be to wait for the callback, and in the meantime show a spinner.
Upvotes: 2