Skip to content

Instantly share code, notes, and snippets.

@deezaster
Created July 29, 2014 17:20
Show Gist options
  • Save deezaster/3649e123c1acff18650c to your computer and use it in GitHub Desktop.
Save deezaster/3649e123c1acff18650c to your computer and use it in GitHub Desktop.
Singleton Class in Swift
class App
{
class var shared : App {
struct Static {
static let instance : App = App()
}
return Static.instance
}
init() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment