mrackwitz / MRProgress

Collection of iOS drop-in components to visualize progress
MIT License
2.55k stars 306 forks source link

Automatically show/hide an overlay view with state of NSURLSessionTask #25

Closed coneybeare closed 10 years ago

coneybeare commented 10 years ago

I have been using AFNetworking 2.0 a lot lately and @mattt has a ton of great UIKit categories that allow things like a spinner to start/stop with the activity of an NSURLSessionTask or NSURLConnection.

http://cocoadocs.org/docsets/AFNetworking/2.0.0/Categories/UIActivityIndicatorView+AFNetworking.html

Would you consider adding some sort of similar api for the overlay view? Specifically, I think a dismissWithStateOfTask method would be very useful as we would not have to manually dismiss the overlay upon completion of whatever task we are running.

mrackwitz commented 10 years ago

Yeah, @mattt's AFNetworking is really great. I think this would be a good idea. I would implement it soon as I would use it myself, too. Thank you for this proposal.

coneybeare commented 10 years ago

Awesome. It would probably be a good idea to add a minimum show time, say 0.3 seconds so that quick responses do not flash on/off really quickly. MBProgressHUD used to have an api like this

mrackwitz commented 10 years ago

With version 0.6.0 AFNetworking is now initially supported.