Completion Handlers

    I’ve heard about it. I don’t know how to make one

    Do something when something has been done

    1. Notify the user when the download completed

    Design Handler Block

    Create a function that is similar to downloading an image by calling a loop. Once the download has been finished, you may notify the user.

    The function above takes a parameter whose type is . You will pass .

    Pass Closure Directly

    3006_completion_handlers.playground

    Resources

    Completion Handlers in Swift with Bob