Skip to content

Instantly share code, notes, and snippets.

@jk
Created July 21, 2015 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jk/b21f6a7003affd82bd44 to your computer and use it in GitHub Desktop.
Save jk/b21f6a7003affd82bd44 to your computer and use it in GitHub Desktop.
How to write a correct singleton in Swift. Source: http://krakendev.io/blog/the-right-way-to-write-a-singleton
class TheOneAndOnlyKraken {
static let sharedInstance = TheOneAndOnlyKraken()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment