Series: Large File Downloads

Large File Downloads

This episode covers the complex topic of implementing file downloads with a custom UI. Covers tracking progress, background download support, resuming, and implementing a custom button to show the status of a download.

Length: about 2 hours

Installments

1. File Downloads - Part 1

Subscribers only

Downloading large files on iOS represents some unique challenges. Downloads should occur in the background, not confined to a particular view controller. They should be able to report progress on multiple screens, and should be robust enough to survive application suspension and failing network conditions, and respect the user's cellular data plan. In this episode we start a series on downloading large files that will cover all of the above concerns.

2. File Downloads - Part 2

Subscribers only

In this episode we create a DownloadInfo model in CoreData in order to track the state of a download, separate from any view controller.

3. File Downloads - Part 3

Subscribers only

In this episode we take the download state and progress notifications and update the user interface to reflect this state. We'll see how to translate the notification into the indexPath for that episode row, and how to fake a change related to the fetched results controller to trigger a reload of the content. We will leverage the RateLimit library to save periodic changes in progress to the model without overwhelming Core Data.

4. Designing a Custom Download Button - Part 1

Subscribers only

In this episode we create a custom control to serve as our download button. We start by creating a circular progress indicator using CAShapeLayer, then move on to subclassing UIControl to provide our image view and touch handling.

5. Designing a Custom Download Button - Part 2

Subscribers only

Wrapping up our custom download button, this time we focus on the highlighted image and depressed state of the button, as well as transitioning to and from the progress layer.