AFNetworking includes a UIProgressView+AFNetworking
category that makes it easy to add a progress bar to either an upload or download session task. In this recipe, we will create the NSURLSessionDownloadTask
using AFNetworking and then add a progress bar to show the progress of the download.
You will need to download and add AFNetworking to your project. You will also need to include the
UIProgressView+AFNetworking
class from the UIKit+AFNetworking
directory into your project. The UIKit+AFNetworking
files are included when you download AFNetworking.
Let's look at how we would add a progress bar to our projects.