A project (Xcode 9) demonstrating delegates/delegation in iOS with Swift 4. I use delegation to get notified and do whatever I want when a file has finished downloading.