Created
February 22, 2020 07:33
-
-
Save SURYAKANTSHARMA/6237f15beb17a7633cef25acd353ee6a to your computer and use it in GitHub Desktop.
This file contains 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
class Singleton { | |
private init() { } | |
static let sharedInstance: Singleton = { | |
let instance = Singleton() | |
// setup code | |
return instance | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment