Skip to content

Instantly share code, notes, and snippets.

@pallavtrivedi03
Created August 7, 2022 06:17
Show Gist options
  • Save pallavtrivedi03/fd9cb43dc76ead6ddc97ef826e034741 to your computer and use it in GitHub Desktop.
Save pallavtrivedi03/fd9cb43dc76ead6ddc97ef826e034741 to your computer and use it in GitHub Desktop.
class Singleton {
static let shared: 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