Skip to content

Instantly share code, notes, and snippets.

@StanDimitroff
Last active February 5, 2018 14:16
Show Gist options
  • Save StanDimitroff/b7708d3e6cea6ea40679e4e2e8d3ba72 to your computer and use it in GitHub Desktop.
Save StanDimitroff/b7708d3e6cea6ea40679e4e2e8d3ba72 to your computer and use it in GitHub Desktop.
Using enums in Realm
// 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