Last active
June 25, 2019 15:44
-
-
Save Arrlindii/64d52edd78e91ef49fd8d8a78a715ce1 to your computer and use it in GitHub Desktop.
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
| NotificationCenter.default.publisher(for: .userUpdated).map { notification in | |
| return notification.userInfo?["data"] as! Data | |
| } | |
| .decode(type: User.self, decoder: JSONDecoder()) | |
| .map { $0.name} | |
| .sink { username in | |
| self.usernameLabel.text = username | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment