Last active
February 5, 2018 14:16
-
-
Save StanDimitroff/b7708d3e6cea6ea40679e4e2e8d3ba72 to your computer and use it in GitHub Desktop.
Using enums in Realm
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
// Only for Int raw values | |
class Thread: Object { | |
@objc dynamic var state: State = .ready | |
} | |
@objc enum State: Int { | |
case ready | |
case running | |
case waiting | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment