Skip to content

Instantly share code, notes, and snippets.

@chriswebb09
Created May 11, 2017 09:52
Show Gist options
  • Save chriswebb09/8e89ef87d1a1f615afe2a8b4540efb6f to your computer and use it in GitHub Desktop.
Save chriswebb09/8e89ef87d1a1f615afe2a8b4540efb6f to your computer and use it in GitHub Desktop.
final class Download {
weak var delegate: DownloadDelegate?
// Other properties
var progress: Float = 0.0 {
didSet {
updateProgress()
}
}
// Gives float for download progress - for delegate
private func updateProgress() {
delegate?.downloadProgressUpdated(for: progress)
}
// Initialization
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment