Created
August 28, 2018 21:24
-
-
Save Arrlindii/5eb828a3a96b07f44eb4e2ff3da3bc2f 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
| enum NotificationName { | |
| case emailChangeNotification | |
| } | |
| protocol StateChangeObserver : class { | |
| func didChange(_ notification: NotificationName, value: String) | |
| } | |
| class LoginData { | |
| weak var observer:StateChangeObserver? | |
| var email: String = "" { | |
| didSet { | |
| observer?.didChange(.emailChangeNotification, value: email) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment