Last active
January 19, 2017 15:06
-
-
Save sauvikatinnofied/2dace27129874469770c1c2650f52182 to your computer and use it in GitHub Desktop.
Medium Blog Post Code Snippet
This file contains 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
/// Adds a new listener to the listeners array | |
/// | |
/// - parameter delegate: a new listener | |
func addListener(listener: NetworkStatusListener){ | |
listeners.append(listener) | |
} | |
/// Removes a listener from listeners array | |
/// | |
/// - parameter delegate: the listener which is to be removed | |
func removeListener(listener: NetworkStatusListener){ | |
listeners = listeners.filter{ $0 !== listener} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment