AppHubPlatform / apphub

apphub is an iOS client for AppHub
https://apphub.io
Other
206 stars 29 forks source link

Task handler block #23

Closed ptmt closed 8 years ago

ptmt commented 8 years ago

I have the use case when the build is being forced to download on the start-up time, even on slow connections. It would useful to show a UIProgressView at that time.

This PR adds a special hook to AHBuildManager.

My AppDelegate is something like this:

UIProgressView progressView = (UIProgressView )[_launchView subviews].lastObject; [[AppHub buildManager] setTaskHandlerBlock:^(NSURLSessionDownloadTask *task){ [progressView setProgressWithDownloadProgressOfTask:task animated:YES]; }];

Sorry for not squashed commits.

arbesfeld commented 8 years ago

Awesome, thanks for the PR @ptmt!

ptmt commented 8 years ago

Thanks! :)