I downloaded some examples in order to learn Ios.
The examples include:
- AFNetworking;
- Inapp purchase (from RayW);
- MBProgressHud;
In my viewcontroller i push a UIbutton which triggers the Inapp purchase Singleton example and start download a file from my server with AFHTTPRequestOperation. This part of communication works. But what i want to achieve is to have my hud updated while downloading. As the file is >10Mb.
So, the question is how do i update the hud with the progress of the download? I try to draw it down.
I push the button in Viewcontroller and the hud will displayed;
--> request will sent to the Singleton InApp helper class which handles the networking part;
--> After that the AFHTTPRequestOperation will be called inside the singleton class for the download of file;
- ---> During this download i use the setDownloadProgressBlock method for the progress.
But how do i sent the progress info back to my hud in the viewcontroller?
Thanks.