How to make a loading overlay with a spinner when doing async task with NSURLSessionDataTask
?
Asked
Active
Viewed 73 times
0

Michael Dautermann
- 88,797
- 17
- 166
- 215

user3691709
- 131
- 3
- 8
1 Answers
0
Your NSURLSessionDataTask has a delegate object you designate to which it will send periodic messages to inform the delegate of what's happening in the asynchronous task. Perhaps you'll set that delegate to be the view controller that the user sees while the task is going on.
If this were my code, I'd probably have my view controller display a hidden UIView containing an animated spinner the first time [URLSession:dataTask:didBecomeDownloadTask:]
is called, as the download is starting up.

Michael Dautermann
- 88,797
- 17
- 166
- 215