Last active
August 29, 2015 14:02
-
-
Save pala/f13bca8a1380b8d58da6 to your computer and use it in GitHub Desktop.
Singleton in Swift
This file contains hidden or 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
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