Last active
May 29, 2019 13:16
-
-
Save vanessaaleung/b102fc8076dc6e35639c9d2947842b36 to your computer and use it in GitHub Desktop.
NotificationCenter.default.addObserver
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
//if receive notification "NotificationName", execute func `isDataGet` | |
NotificationCenter.default.addObserver(self, selector: #selector(isDataGet(_:)), | |
name: NSNotification.Name("NotificationName") , object: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment