Created
July 24, 2015 05:46
-
-
Save noxious/9c164339973217eaf52f to your computer and use it in GitHub Desktop.
singleton in swift
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 TheOneAndOnlyKraken { | |
static let sharedInstance = TheOneAndOnlyKraken() | |
private init() {} //This prevents others from using the default '()' initializer for this class. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment