Created
August 11, 2016 06:23
-
-
Save nolili/7e821c00b991e6283ee1cbdcc13f2f0b to your computer and use it in GitHub Desktop.
Notification on Swift 3
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
// define notification name as extension of Notification.Name | |
extension Notification.Name { | |
public static let ViewControllerDidUpdate = Notification.Name("ViewControllerDidUpdateNotification") | |
} | |
// post notification | |
NotificationCenter.default.post(Notification(name: .ViewControllerDidUpdate)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment