Edwin Vermeer
Feb 24, 2017 · 1 min read

Hi, question, since you only have 1 funcion in your delegate, couldn’t you just add a closure function to your list of listners? You would then don’t need a delegate and protocol. You only need to add code like this:

ReachabilityManager.shared.addListener { status in

switch status {

case .notReachable:

debugPrint(“ViewController: Network became unreachable”)

case .reachableViaWiFi:

debugPrint(“ViewController: Network reachable through WiFi”)

case .reachableViaWWAN:

debugPrint(“ViewController: Network reachable through Cellular Data”)

}

}

    Edwin Vermeer

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight.
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox.
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month.