Skip to content

Instantly share code, notes, and snippets.

@pala
Last active August 29, 2015 14:02
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 pala/f13bca8a1380b8d58da6 to your computer and use it in GitHub Desktop.
Save pala/f13bca8a1380b8d58da6 to your computer and use it in GitHub Desktop.
Singleton in Swift
public class var sharedConfiguration: AppConfiguration {
struct Singleton {
static let sharedAppConfiguration = AppConfiguration()
}
return Singleton.sharedAppConfiguration
}
// Checkout Lister: A Productivity App Built in Swift by Apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment