Created
May 11, 2017 09:52
-
-
Save chriswebb09/8e89ef87d1a1f615afe2a8b4540efb6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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